From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751126AbbEYWwG (ORCPT ); Mon, 25 May 2015 18:52:06 -0400 Received: from mail-qk0-f177.google.com ([209.85.220.177]:33171 "EHLO mail-qk0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750859AbbEYWwE convert rfc822-to-8bit (ORCPT ); Mon, 25 May 2015 18:52:04 -0400 Message-ID: <5563A74F.4090401@gmail.com> Date: Mon, 25 May 2015 19:50:55 -0300 From: Gaston Gonzalez User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: Dan Carpenter CC: gregkh@linuxfoundation.org, cristina.opriceana@gmail.com, hamohammed.sa@gmail.com, gdonald@gmail.com, mahfouz.saif.elyazal@gmail.com, paul.gortmaker@windriver.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Gaston Gonzalez Subject: Re: [PATCH] staging: rtl8192u: ieee80211: Silence sparse endianness warning References: <1432566042-16688-1-git-send-email-gascoar@gmail.com> <20150525163512.GE11588@mwanda> In-Reply-To: <20150525163512.GE11588@mwanda> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25/05/15 13:35, Dan Carpenter wrote: > This is also wrong then. > > regards, > dan carpenter Hi Dan, Yes, you are right. It is the next sparse warning in line for that file. Including the fix for that, the patch would be as showed below. There are similar endianness warnings for other variables in that file, like the FIXME in last line of the patch. But keeping in mind the rule 'one thing per patch' I guess this should be fixed in other patche/s, right? Regards, Gaston diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c index d2e8b12..0477ba1 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c @@ -660,2 +660,2 @@ inline struct sk_buff *ieee80211_authentication_req(struct ieee80211_network *be auth = (struct ieee80211_authentication *) skb_put(skb, sizeof(struct ieee80211_authentication)); - auth->header.frame_ctl = IEEE80211_STYPE_AUTH; - if (challengelen) auth->header.frame_ctl |= IEEE80211_FCTL_WEP; + auth->header.frame_ctl = cpu_to_le16(IEEE80211_STYPE_AUTH); + if (challengelen) + auth->header.frame_ctl |= cpu_to_le16(IEEE80211_FCTL_WEP); auth->header.duration_id = 0x013a; //FIXME -- 2.1.4