Commit eebdd3f6 authored by Jaya Durga's avatar Jaya Durga Committed by Greg Kroah-Hartman

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: default avatarJaya Durga <rjdurga@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 24c8bd8f
...@@ -170,8 +170,10 @@ enum WIFI_REG_DOMAIN { ...@@ -170,8 +170,10 @@ enum WIFI_REG_DOMAIN {
*(__le16 *)(pbuf) &= (~cpu_to_le16(_FROM_DS_)); \ *(__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) ({ \ #define SetMFrag(pbuf) ({ \
*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_); \ *(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_); \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment