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: <20161115122433.GP28701@mwanda>
Date:   Tue, 15 Nov 2016 15:25:17 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Sergio Paracuellos <sergio.paracuellos@...il.com>
Cc:     gregkh@...uxfoundation.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] staging: wlan-ng: use GENMASK macro in different
 defines of p80211hdr.h

On Thu, Nov 10, 2016 at 07:16:40PM +0100, Sergio Paracuellos wrote:
> -#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_FTYPE(n)	((((u16)(n)) & GENMASK(3, 2)) >> 2)
> +#define WLAN_GET_FC_FSTYPE(n)	((((u16)(n)) & GENMASK(7, 4)) >> 4)

The casts to u16 are not needed.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ