public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: gdm724x: Add parenthesis to Macro arguments
@ 2019-04-03  1:04 Andre Dainez
  2019-04-03  4:26 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Andre Dainez @ 2019-04-03  1:04 UTC (permalink / raw)
  To: lkcamp, gregkh, realwakka, straube.linux, hle, rico.schrage,
	sophie.matter, Valentin.Vidic, simon, devel, linux-kernel

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@gmail.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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-04-16 11:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-03  1:04 [PATCH] staging: gdm724x: Add parenthesis to Macro arguments Andre Dainez
2019-04-03  4:26 ` Greg KH
2019-04-08 17:37   ` Andre
2019-04-16 11:20     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox