staging: rtl8723bs: do not use __constant_cpu_to_le16
cpu_to_le16() is capable enough to detect __builtin_constant_p() and to use an appropriate compile time ___constant_swahbXX() function.
So we can use cpu_to_le16() instead of __constant_cpu_to_le16().
--- drivers/staging/rtl8723bs/include/wifi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8723bs/include/wifi.h +2 -2
@@ -266,8 +266,8 @@ enum WIFI_REG_DOMAIN {#define SetFrameType (pbuf, type) \ do { \ - *(unsigned short *)(pbuf) &= __constant_cpu_to_le16(~(BIT(3) | BIT(2))); \ - *(unsigned short *)(pbuf) |= __constant_cpu_to_le16(type); \ + *(unsigned short *)(pbuf) &= cpu_to_le16(~(BIT(3) | BIT(2))); \ + *(unsigned short *)(pbuf) |= cpu_to_le16(type); \ } while (0)#define GetFrameSubType (pbuf) (le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(7) |\
Signature · 1 line
2.21.0
Greg Kroah-Hartman
maintainerQuoted 10 lines · Sergey Senozhatsky
cpu_to_le16()is capable enough to detect__builtin_constant_p()and to use an appropriate compile time___constant_swahbXX()function.So we can use
cpu_to_le16()instead of__constant_cpu_to_le16().Signed-off-by Sergey Senozhatsky <[email protected]>--- drivers/staging/rtl8723bs/include/wifi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
What changed from the previous versions of this patch?
That always has to go below the --- line.
v4? :)
thanks,
greg k-h
Quoted 5 lines · Greg Kroah-Hartman
Quoted 4 lines · Sergey Senozhatsky
cpu_to_le16()is capable enough to detect__builtin_constant_p()and to use an appropriate compile time___constant_swahbXX()function.
Quoted 8 lines
Quoted 6 lines
So we can use
cpu_to_le16()instead of__constant_cpu_to_le16().Signed-off-by Sergey Senozhatsky <[email protected]>--- drivers/staging/rtl8723bs/include/wifi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)What changed from the previous versions of this patch?
In short - nothing :) Just updated email address.
Quoted 3 lines
That always has to go below the --- line.
v4? :)
OK :)
-ss