[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALrZqyNoZkhtNR60MJMBfceir4EUVzG_jNoxf-p6QkwZtj9_5A@mail.gmail.com>
Date: Wed, 15 Feb 2017 08:52:58 +0530
From: SIMRAN SINGHAL <singhalsimran0@...il.com>
To: Joe Perches <joe@...ches.com>
Cc: Greg KH <gregkh@...uxfoundation.org>, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 6/9] staging: rtl8192u: Fixing coding style issues
Yes, I totally agree with joe.
But as there is no coding style issue in this patch.
So, do I have to resend the complete patch series again?
On Wed, Feb 15, 2017 at 1:53 AM, Joe Perches <joe@...ches.com> wrote:
> On Wed, 2017-02-15 at 01:44 +0530, simran singhal wrote:
> []
>> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c
> []
>> @@ -150,14 +150,15 @@ static inline char *rtl819x_translate_scan(struct ieee80211_device *ieee,
>> PHT_CAPABILITY_ELE ht_cap = NULL;
>> bool is40M = false, isShortGI = false;
>> u8 max_mcs = 0;
>> +
>> if (!memcmp(network->bssht.bdHTCapBuf, EWC11NHTCap, 4))
>> ht_cap = (PHT_CAPABILITY_ELE)&network->bssht.bdHTCapBuf[4];
>> else
>> ht_cap = (PHT_CAPABILITY_ELE)&network->bssht.bdHTCapBuf[0];
>> - is40M = (ht_cap->ChlWidth)?1:0;
>> - isShortGI = (ht_cap->ChlWidth)?
>> - ((ht_cap->ShortGI40Mhz)?1:0):
>> - ((ht_cap->ShortGI20Mhz)?1:0);
>> + is40M = (ht_cap->ChlWidth) ? 1 : 0;
>> + isShortGI = (ht_cap->ChlWidth) ?
>> + ((ht_cap->ShortGI40Mhz) ? 1 : 0) :
>> + ((ht_cap->ShortGI20Mhz) ? 1 : 0);
>
> You have a brain, checkpatch is brainless.
> Please remember to do more than just shut-up checkpatch.
>
> This could be simplified by removing parentheses and ternaries to
>
> isShortGI = ht_cap->Ch1Width ? ht_cap->ShortGI40Mhz
> : ht_cap->ShortGI20Mhz;
>
>
Powered by blists - more mailing lists