From: Jitendra Kumar Khasdev <jkhasdev@gmail.com>
To: davem@davemloft.net, edumazet@google.com,
alexander.h.duyck@redhat.com, linus.luessing@c0d3.bluen,
hannes@stressinduktion.org, willemb@google.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Jitendra Kumar Khasdev <jitendra.khasdev@hotwaxsystems.com>,
Jitendra Kumar Khasdev <jkhasdev@gmail.com>
Subject: [PATCH] staging: net: core: skbuff.c: Added do-while pair for complex macros
Date: Thu, 26 Nov 2015 22:06:03 +0530 [thread overview]
Message-ID: <1448555763-5088-1-git-send-email-jitendra.khasdev@hotwaxsystems.com> (raw)
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@gmail.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
next reply other threads:[~2015-11-26 16:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-26 16:36 Jitendra Kumar Khasdev [this message]
2015-11-26 17:00 ` Joe Perches
2015-11-26 21:43 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1448555763-5088-1-git-send-email-jitendra.khasdev@hotwaxsystems.com \
--to=jkhasdev@gmail.com \
--cc=alexander.h.duyck@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hannes@stressinduktion.org \
--cc=jitendra.khasdev@hotwaxsystems.com \
--cc=linus.luessing@c0d3.bluen \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=willemb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®