Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1516390 > unrolled thread
| Started by | Sergio Paracuellos <sergio.paracuellos@gmail.com> |
|---|---|
| First post | 2016-11-07 19:00 +0100 |
| Last post | 2016-11-10 12:40 +0100 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[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
| From | Sergio Paracuellos <sergio.paracuellos@gmail.com> |
|---|---|
| Date | 2016-11-07 19:00 +0100 |
| Subject | [PATCH 01/11] staging: wlan-ng: fix line style issue in macro WLAN_GET_FC_FSTYPE |
| Message-ID | <sAWn8-6sr-3@gated-at.bofh.it> |
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. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> --- drivers/staging/wlan-ng/p80211hdr.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wlan-ng/p80211hdr.h b/drivers/staging/wlan-ng/p80211hdr.h index c9b7337..c8f78d9 100644 --- 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) #define WLAN_GET_FC_TODS(n) ((((u16)(n)) & (BIT(8))) >> 8) #define WLAN_GET_FC_FROMDS(n) ((((u16)(n)) & (BIT(9))) >> 9) #define WLAN_GET_FC_ISWEP(n) ((((u16)(n)) & (BIT(14))) >> 14) -- 1.9.1
[toc] | [next] | [standalone]
| From | Joe Perches <joe@perches.com> |
|---|---|
| Date | 2016-11-07 20:00 +0100 |
| Subject | Re: [PATCH 01/11] staging: wlan-ng: fix line style issue in macro WLAN_GET_FC_FSTYPE |
| Message-ID | <sAXjd-74X-47@gated-at.bofh.it> |
| In reply to | #1516390 |
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)
[toc] | [prev] | [next] | [standalone]
| From | Sergio Paracuellos <sergio.paracuellos@gmail.com> |
|---|---|
| Date | 2016-11-08 07:00 +0100 |
| Subject | Re: [PATCH 01/11] staging: wlan-ng: fix line style issue in macro WLAN_GET_FC_FSTYPE |
| Message-ID | <sB7BT-5gl-1@gated-at.bofh.it> |
| In reply to | #1516486 |
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) >
[toc] | [prev] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-11-10 12:40 +0100 |
| Subject | Re: [PATCH 01/11] staging: wlan-ng: fix line style issue in macro WLAN_GET_FC_FSTYPE |
| Message-ID | <sBVS2-5xN-51@gated-at.bofh.it> |
| In reply to | #1516829 |
A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? A: No. Q: Should I include quotations after my reply? http://daringfireball.net/2007/07/on_top On Tue, Nov 08, 2016 at 06:35:36AM +0100, Sergio Paracuellos wrote: > 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? Yes, that would be fine. thanks, greg k-h
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web