From 959aabedcd91ba659e17191f1d3da96ceb1c4147 Mon Sep 17 00:00:00 2001 From: Dee-Jay Anthony Logozzo Date: Wed, 11 Aug 2021 23:41:32 +1000 Subject: [PATCH] staging: gdm724x: Place macro argument within parentheses Place the macro arguments within parentheses to avoid precedence issues. This solves the following checkpatch.pl warnings CHECK: Macro argument 'len' may be better as '(len)' to avoid precedence issues +#define ND_NLMSG_S_LEN(len) (len + ND_IFINDEX_LEN) CHECK: Macro argument 'nlh' may be better as '(nlh)' to avoid precedence issues +#define ND_NLMSG_R_LEN(nlh) (nlh->nlmsg_len - ND_IFINDEX_LEN) Signed-off-by: Dee-Jay Anthony Logozzo Link: https://lore.kernel.org/r/20210811134132.5240-1-dj@djl.id.au Signed-off-by: Greg Kroah-Hartman --- drivers/staging/gdm724x/netlink_k.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/gdm724x/netlink_k.c b/drivers/staging/gdm724x/netlink_k.c index 7902e52a699b..8f39cc5617aa 100644 --- a/drivers/staging/gdm724x/netlink_k.c +++ b/drivers/staging/gdm724x/netlink_k.c @@ -19,8 +19,8 @@ static DEFINE_MUTEX(netlink_mutex); #define ND_NLMSG_SPACE(len) (NLMSG_SPACE(len) + ND_IFINDEX_LEN) #define ND_NLMSG_DATA(nlh) ((void *)((char *)NLMSG_DATA(nlh) + \ ND_IFINDEX_LEN)) -#define ND_NLMSG_S_LEN(len) (len + ND_IFINDEX_LEN) -#define ND_NLMSG_R_LEN(nlh) (nlh->nlmsg_len - ND_IFINDEX_LEN) +#define ND_NLMSG_S_LEN(len) ((len) + ND_IFINDEX_LEN) +#define ND_NLMSG_R_LEN(nlh) ((nlh)->nlmsg_len - ND_IFINDEX_LEN) #define ND_NLMSG_IFIDX(nlh) NLMSG_DATA(nlh) #define ND_MAX_MSG_LEN (1024 * 32)