linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergio Paracuellos <sergio.paracuellos@gmail.com>
To: Joe Perches <joe@perches.com>, gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 01/11] staging: wlan-ng: fix line style issue in macro WLAN_GET_FC_FSTYPE
Date: Tue, 8 Nov 2016 06:35:36 +0100	[thread overview]
Message-ID: <58216428.3040409@gmail.com> (raw)
In-Reply-To: <1478545060.22008.5.camel@perches.com>

Thanks for pointing that Joe. There other files and macros where
GENMASK stuff could be applied in wlan-ng driver. Maybe it should be 
better to apply this patch as it is now and send another patch later 
which changes all of them. What do you think?

Cheers,
	Sergio Paracuellos

El 2016年11月07日 a las 19:57, Joe Perches escribió:
> On Mon, 2016-11-07 at 18:55 +0100, Sergio Paracuellos wrote:
>> This patch fix the following checkpatch.pl script warning:
>> WARNING: line over 80 characters
>>
>> It also add spaces between or operators inside the macro to
>> comply with the standard kernel coding style.
> []
>> diff --git a/drivers/staging/wlan-ng/p80211hdr.h b/drivers/staging/wlan-ng/p80211hdr.h
> []
>> @@ -132,7 +132,8 @@
>>   /*------------------------------------------------------------*/
>>
>>   #define WLAN_GET_FC_FTYPE(n)	((((u16)(n)) & (BIT(2) | BIT(3))) >> 2)
>> -#define WLAN_GET_FC_FSTYPE(n)	((((u16)(n)) & (BIT(4)|BIT(5)|BIT(6)|BIT(7))) >> 4)
>> +#define WLAN_GET_FC_FSTYPE(n)	((((u16)(n)) & \
>> +				(BIT(4) | BIT(5) | BIT(6) | BIT(7))) >> 4)
>
> Probably better to use GENMASK
>
> #define WLAN_GET_FC_FTYPE(n)		((((u16)(n)) & GENMASK(3, 2)) >> 2)
> #define WLAN_GET_FC_FSTYPE(n)		((((u16)(n)) & GENMASK(7, 4)) >> 4)
>

  reply	other threads:[~2016-11-08  5:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-07 17:55 [PATCH 00/11] staging: wlan-ng: fix some style issues Sergio Paracuellos
2016-11-07 17:55 ` [PATCH 01/11] staging: wlan-ng: fix line style issue in macro WLAN_GET_FC_FSTYPE Sergio Paracuellos
2016-11-07 18:57   ` Joe Perches
2016-11-08  5:35     ` Sergio Paracuellos [this message]
2016-11-10  7:26       ` Greg KH
2016-11-07 17:55 ` [PATCH 02/11] staging: wlan-ng: remove unnecessary out of memory message in p80211conv.c Sergio Paracuellos
2016-11-07 17:55 ` [PATCH 03/11] staging: wlan-ng: remove unnecessary parenthesis in hfa384x_usb.c Sergio Paracuellos
2016-11-07 17:55 ` [PATCH 04/11] staging: wlan-ng: replace BUG_ON() into WARN_ON() on hfa384x_usbin_callback Sergio Paracuellos
2016-11-07 17:55 ` [PATCH 05/11] staging: wlan-ng: match open parenthesis alignment in hfa384x_usb.c Sergio Paracuellos
2016-11-07 17:55 ` [PATCH 06/11] staging: wlan-ng: match open parenthesis alignment in p80211req.c Sergio Paracuellos
2016-11-07 17:55 ` [PATCH 07/11] staging: wlan-ng: change comparison to NULL to preferred style Sergio Paracuellos
2016-11-07 17:55 ` [PATCH 08/11] staging: wlan-ng: remove unnecessary blank lines in p80211wep.c Sergio Paracuellos
2016-11-07 17:55 ` [PATCH 09/11] staging: wlan-ng: fix parenthesis alignment in prism2fw.c Sergio Paracuellos
2016-11-07 17:55 ` [PATCH 10/11] staging: wlan-ng: remove unnecessary blank lines " Sergio Paracuellos
2016-11-07 17:55 ` [PATCH 11/11] staging: wlan-ng: remove unnecessary parenthesis " Sergio Paracuellos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58216428.3040409@gmail.com \
    --to=sergio.paracuellos@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).