Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1947365AbdD1KD2 (ORCPT ); Fri, 28 Apr 2017 06:03:28 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37064 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1947168AbdD1KDN (ORCPT ); Fri, 28 Apr 2017 06:03:13 -0400 Date: Fri, 28 Apr 2017 12:02:58 +0200 From: Greg KH To: Karim Eshapa Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] drivers:staging:wlan-ng:hfa384x_usb: Fixing sparse warnings. Message-ID: <20170428100258.GA4276@kroah.com> References: <1493223340-13794-1-git-send-email-karim.eshapa@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1493223340-13794-1-git-send-email-karim.eshapa@gmail.com> User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1112 Lines: 28 On Wed, Apr 26, 2017 at 06:15:40PM +0200, Karim Eshapa wrote: > Fixing sparse warnings incorrect type assignment. > > Signed-off-by: Karim Eshapa > --- > drivers/staging/wlan-ng/hfa384x_usb.c | 24 ++++++++++++++---------- > 1 file changed, 14 insertions(+), 10 deletions(-) > > diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c > index 6134eba..cf6bf65 100644 > --- a/drivers/staging/wlan-ng/hfa384x_usb.c > +++ b/drivers/staging/wlan-ng/hfa384x_usb.c > @@ -3511,20 +3511,24 @@ static void hfa384x_int_rxmonitor(struct wlandevice *wlandev, > datap = skb_put(skb, sizeof(struct p80211_caphdr)); > caphdr = (struct p80211_caphdr *)datap; > > - caphdr->version = htonl(P80211CAPTURE_VERSION); > - caphdr->length = htonl(sizeof(struct p80211_caphdr)); > + caphdr->version = __be32_to_cpu(htonl(P80211CAPTURE_VERSION)); > + caphdr->length = __be32_to_cpu( htonl(sizeof( > + struct p80211_caphdr))); How do you know this is correct? And why the odd ' ' usage? I can't take this patch for that reason alone... thanks, greg k-h