From 3d7164c3790adfb34472c42e6290748b03e1d1d0 Mon Sep 17 00:00:00 2001 From: Jannik Becher Date: Tue, 20 Dec 2016 18:59:42 +0100 Subject: staging: rtl8712: changed GetFrameSubType macro Fixed a sparse warning. GetFrameSubType and GetFrameType should cast to __le16. Furthermore GetFramSubType should use le16_to_cpu instead of cpu_to_le16. Signed-off-by: Jannik Becher Tested-by: Larry Finger Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8712/wifi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/staging/rtl8712/wifi.h') diff --git a/drivers/staging/rtl8712/wifi.h b/drivers/staging/rtl8712/wifi.h index b8af9656e6da..7ebf247b2aff 100644 --- a/drivers/staging/rtl8712/wifi.h +++ b/drivers/staging/rtl8712/wifi.h @@ -229,7 +229,7 @@ enum WIFI_REG_DOMAIN { #define GetOrder(pbuf) (((*(unsigned short *)(pbuf)) & \ le16_to_cpu(_ORDER_)) != 0) -#define GetFrameType(pbuf) (le16_to_cpu(*(unsigned short *)(pbuf)) & \ +#define GetFrameType(pbuf) (le16_to_cpu(*(__le16 *)(pbuf)) & \ (BIT(3) | BIT(2))) #define SetFrameType(pbuf, type) \ @@ -239,7 +239,7 @@ enum WIFI_REG_DOMAIN { *(unsigned short *)(pbuf) |= cpu_to_le16(type); \ } while (0) -#define GetFrameSubType(pbuf) (cpu_to_le16(*(unsigned short *)(pbuf)) & \ +#define GetFrameSubType(pbuf) (le16_to_cpu(*(__le16 *)(pbuf)) & \ (BIT(7) | BIT(6) | BIT(5) | BIT(4) | BIT(3) | \ BIT(2))) -- cgit v1.2.3