lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1478545060.22008.5.camel@perches.com>
Date:   Mon, 07 Nov 2016 10:57:40 -0800
From:   Joe Perches <joe@...ches.com>
To:     Sergio Paracuellos <sergio.paracuellos@...il.com>,
        gregkh@...uxfoundation.org
Cc:     devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/11] staging: wlan-ng: fix line style issue in macro
 WLAN_GET_FC_FSTYPE

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)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ