lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1448555763-5088-1-git-send-email-jitendra.khasdev@hotwaxsystems.com>
Date:	Thu, 26 Nov 2015 22:06:03 +0530
From:	Jitendra Kumar Khasdev <jkhasdev@...il.com>
To:	davem@...emloft.net, edumazet@...gle.com,
	alexander.h.duyck@...hat.com, linus.luessing@...3.bluen,
	hannes@...essinduktion.org, willemb@...gle.com
Cc:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	Jitendra Kumar Khasdev <jitendra.khasdev@...waxsystems.com>,
	Jitendra Kumar Khasdev <jkhasdev@...il.com>
Subject: [PATCH] staging: net: core: skbuff.c: Added do-while pair for complex macros

This patch is to file skbuff.c that fixes up following error,
reported by checkpatch.pl tool,

1. ERROR: Macros with multiple statements should be enclosed
   in a do - while loop.

Signed-off-by: Jitendra Kumar Khasdev <jkhasdev@...il.com>
---
 net/core/skbuff.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index aa41e6d..4d31228 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -748,11 +748,13 @@ void consume_skb(struct sk_buff *skb)
 EXPORT_SYMBOL(consume_skb);
 
 /* Make sure a field is enclosed inside headers_start/headers_end section */
-#define CHECK_SKB_FIELD(field) \
-	BUILD_BUG_ON(offsetof(struct sk_buff, field) <		\
-		     offsetof(struct sk_buff, headers_start));	\
-	BUILD_BUG_ON(offsetof(struct sk_buff, field) >		\
-		     offsetof(struct sk_buff, headers_end));	\
+#define CHECK_SKB_FIELD(field)						\
+	do {								\
+		BUILD_BUG_ON(offsetof(struct sk_buff, field) <		\
+			offsetof(struct sk_buff, headers_start));	\
+		BUILD_BUG_ON(offsetof(struct sk_buff, field) >		\
+			offsetof(struct sk_buff, headers_end));		\
+	} while (0)							\
 
 static void __copy_skb_header(struct sk_buff *new, const struct sk_buff *old)
 {
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ