Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jaya Durga and committed by
Greg Kroah-Hartman
eebdd3f6 24c8bd8f

+4 -2
+4 -2
drivers/staging/rtl8712/wifi.h
··· 170 170 *(__le16 *)(pbuf) &= (~cpu_to_le16(_FROM_DS_)); \ 171 171 }) 172 172 173 - #define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe)) 174 - 173 + static inline unsigned char get_tofr_ds(unsigned char *pframe) 174 + { 175 + return ((GetToDs(pframe) << 1) | GetFrDs(pframe)); 176 + } 175 177 176 178 #define SetMFrag(pbuf) ({ \ 177 179 *(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_); \