Commit 6724ed7f authored by George Edward Bulmer's avatar George Edward Bulmer Committed by Greg Kroah-Hartman

staging: most: convert macro to static function

This fixes checkpatch warning:
CHECK: Macro argument reuse 'buf' - possible side effects?
Signed-off-by: default avatarGeorge Edward Bulmer <gebulmer@googlemail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9917b209
...@@ -46,10 +46,12 @@ ...@@ -46,10 +46,12 @@
((len) > MEP_HDR_LEN && \ ((len) > MEP_HDR_LEN && \
EXTRACT_BIT_SET(PMS_FIFONO, (buf)[3]) == PMS_FIFONO_MEP) EXTRACT_BIT_SET(PMS_FIFONO, (buf)[3]) == PMS_FIFONO_MEP)
#define PMS_IS_MAMAC(buf, len) \ static inline bool pms_is_mamac(char *buf, u32 len)
((len) > MDP_HDR_LEN && \ {
EXTRACT_BIT_SET(PMS_FIFONO, (buf)[3]) == PMS_FIFONO_MDP && \ return (len > MDP_HDR_LEN &&
EXTRACT_BIT_SET(PMS_TELID, (buf)[14]) == PMS_TELID_UNSEGM_MAMAC) EXTRACT_BIT_SET(PMS_FIFONO, buf[3]) == PMS_FIFONO_MDP &&
EXTRACT_BIT_SET(PMS_TELID, buf[14]) == PMS_TELID_UNSEGM_MAMAC);
}
struct net_dev_channel { struct net_dev_channel {
bool linked; bool linked;
...@@ -435,7 +437,7 @@ static int comp_rx_data(struct mbo *mbo) ...@@ -435,7 +437,7 @@ static int comp_rx_data(struct mbo *mbo)
dev = nd->dev; dev = nd->dev;
if (nd->is_mamac) { if (nd->is_mamac) {
if (!PMS_IS_MAMAC(buf, len)) { if (!pms_is_mamac(buf, len)) {
ret = -EIO; ret = -EIO;
goto put_nd; goto put_nd;
} }
......
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