[<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