[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1554253445-28635-1-git-send-email-andredainez@gmail.com>
Date: Tue, 2 Apr 2019 22:04:05 -0300
From: Andre Dainez <andredainez@...il.com>
To: lkcamp@...ts.libreplanetbr.org, gregkh@...uxfoundation.org,
realwakka@...il.com, straube.linux@...il.com, hle@....eu.com,
rico.schrage@...il.com, sophie.matter@....de,
Valentin.Vidic@...Net.hr, simon@...anor.nu,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCH] staging: gdm724x: Add parenthesis to Macro arguments
Fix checkpatch errors:
CHECK: Macro argument 'len' may be better as '(len)' to avoid precedence issues
CHECK: Macro argument 'nlh' may be better as '(nlh)' to avoid precedence issues
Signed-off-by: Andre Dainez <andredainez@...il.com>
---
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 92440c3..36d88f4 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)
--
2.7.4
Powered by blists - more mailing lists