Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752897AbcJJORs (ORCPT ); Mon, 10 Oct 2016 10:17:48 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:36467 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752047AbcJJORr (ORCPT ); Mon, 10 Oct 2016 10:17:47 -0400 From: Sergio Paracuellos To: gregkh@linuxfoundation.org Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] staging: wlan-ng: Replace data type declaration with variable of same type in prism2sta.c Date: Mon, 10 Oct 2016 16:02:22 +0200 Message-Id: <1476108142-27623-6-git-send-email-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1476108142-27623-1-git-send-email-sergio.paracuellos@gmail.com> References: <1476108142-27623-1-git-send-email-sergio.paracuellos@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1145 Lines: 35 sizeof(*var) instead of sizeof(struct XXX) is preferred. Fix them in prism2sta.c file. Signed-off-by: Sergio Paracuellos --- drivers/staging/wlan-ng/prism2sta.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index b3ae2bb..351f08d 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -1102,8 +1102,7 @@ static void prism2sta_inf_hostscanresults(struct wlandevice *wlandev, kfree(hw->scanresults); - hw->scanresults = kmemdup(inf, sizeof(struct hfa384x_inf_frame), - GFP_ATOMIC); + hw->scanresults = kmemdup(inf, sizeof(*inf), GFP_ATOMIC); if (nbss == 0) nbss = -1; @@ -1888,8 +1887,8 @@ static struct wlandevice *create_wlan(void) struct hfa384x *hw = NULL; /* Alloc our structures */ - wlandev = kzalloc(sizeof(struct wlandevice), GFP_KERNEL); - hw = kzalloc(sizeof(struct hfa384x), GFP_KERNEL); + wlandev = kzalloc(sizeof(*wlandev), GFP_KERNEL); + hw = kzalloc(sizeof(*hw), GFP_KERNEL); if (!wlandev || !hw) { kfree(wlandev); -- 1.9.1