]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Staging: rtl8712 : wifi.h: Fixed Macro argument reuse
authorJaya Durga <rjdurga@gmail.com>
Fri, 23 Jun 2017 11:24:40 +0000 (16:54 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Jun 2017 14:31:22 +0000 (16:31 +0200)
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>
drivers/staging/rtl8712/wifi.h

index 556367bfbe8a9bd36f55823ec1f941a7fa9b2254..0ed2f44ab4e958e0cb095081ccd13932cd09b284 100644 (file)
@@ -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_); \