diff options
author | Jaya Durga <rjdurga@gmail.com> | 2017-06-23 16:54:40 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-06-25 16:31:22 +0200 |
commit | eebdd3f61bac853e1a42acc59f18c642d2a02eef (patch) | |
tree | 73d1a6f28811aec87d5eaf499ca773d029980325 /drivers/staging/rtl8712 | |
parent | 24c8bd8feb30f9762ef6c37ada656f80c3871df7 (diff) |
Staging: rtl8712 : wifi.h: Fixed Macro argument reuse
CHECK: Macro argument reuse 'pframe' - possible side-effects?
Convert get_tofr_ds macro to inline functions to fix checkpatch check
Signed-off-by: Jaya Durga <rjdurga@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8712')
-rw-r--r-- | drivers/staging/rtl8712/wifi.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/rtl8712/wifi.h b/drivers/staging/rtl8712/wifi.h index 556367bfbe8a..0ed2f44ab4e9 100644 --- a/drivers/staging/rtl8712/wifi.h +++ b/drivers/staging/rtl8712/wifi.h @@ -170,8 +170,10 @@ enum WIFI_REG_DOMAIN { *(__le16 *)(pbuf) &= (~cpu_to_le16(_FROM_DS_)); \ }) -#define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe)) - +static inline unsigned char get_tofr_ds(unsigned char *pframe) +{ + return ((GetToDs(pframe) << 1) | GetFrDs(pframe)); +} #define SetMFrag(pbuf) ({ \ *(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_); \ |