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 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel