Netdev List
 help / color / mirror / Atom feed
From: Lucian Adrian Grijincu <lgrijincu@ixiacom.com>
To: netdev@vger.kernel.org, Octavian Purdila <opurdila@ixiacom.com>
Subject: [PATCH] inet: fix inet_bind_bucket_for_each
Date: Thu, 12 Nov 2009 17:07:26 +0200	[thread overview]
Message-ID: <200911121707.26224.lgrijincu@ixiacom.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 468 bytes --]


The first "node" is supposed to be the cursor used in the for_each.

The second "node" is ment literally and should not be macro expanded:
it's the name of the hlist_node field from the inet_bind_bucket.

This currently works because when inet_bind_bucket_for_each is called
it's argument is still "node".

Signed-off-by: Lucian Adrian Grijincu <lgrijincu@ixiacom.com>
---
 include/net/inet_hashtables.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


[-- Attachment #2: 0001-inet-fix-inet_bind_bucket_for_each.patch --]
[-- Type: text/plain, Size: 542 bytes --]

diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h
index 5b698b3..41cbddd 100644
--- a/include/net/inet_hashtables.h
+++ b/include/net/inet_hashtables.h
@@ -92,8 +92,8 @@ static inline struct net *ib_net(struct inet_bind_bucket *ib)
 	return read_pnet(&ib->ib_net);
 }
 
-#define inet_bind_bucket_for_each(tb, node, head) \
-	hlist_for_each_entry(tb, node, head, node)
+#define inet_bind_bucket_for_each(tb, pos, head) \
+	hlist_for_each_entry(tb, pos, head, node)
 
 struct inet_bind_hashbucket {
 	spinlock_t		lock;

             reply	other threads:[~2009-11-12 15:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-12 15:07 Lucian Adrian Grijincu [this message]
2009-11-14  4:49 ` [PATCH] inet: fix inet_bind_bucket_for_each 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=200911121707.26224.lgrijincu@ixiacom.com \
    --to=lgrijincu@ixiacom.com \
    --cc=netdev@vger.kernel.org \
    --cc=opurdila@ixiacom.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