Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1516486
| From | Joe Perches <joe@perches.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 01/11] staging: wlan-ng: fix line style issue in macro WLAN_GET_FC_FSTYPE |
| Date | 2016-11-07 20:00 +0100 |
| Message-ID | <sAXjd-74X-47@gated-at.bofh.it> (permalink) |
| References | <sAWn8-6sr-5@gated-at.bofh.it> <sAWn8-6sr-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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)
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 01/11] staging: wlan-ng: fix line style issue in macro WLAN_GET_FC_FSTYPE Sergio Paracuellos <sergio.paracuellos@gmail.com> - 2016-11-07 19:00 +0100
Re: [PATCH 01/11] staging: wlan-ng: fix line style issue in macro WLAN_GET_FC_FSTYPE Joe Perches <joe@perches.com> - 2016-11-07 20:00 +0100
Re: [PATCH 01/11] staging: wlan-ng: fix line style issue in macro WLAN_GET_FC_FSTYPE Sergio Paracuellos <sergio.paracuellos@gmail.com> - 2016-11-08 07:00 +0100
Re: [PATCH 01/11] staging: wlan-ng: fix line style issue in macro WLAN_GET_FC_FSTYPE Greg KH <gregkh@linuxfoundation.org> - 2016-11-10 12:40 +0100
csiph-web