netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean Sacren <sakiwit@gmail.com>
To: netdev@vger.kernel.org
Subject: [PATCH net-next 3/3] net: core: fix wrong linkage for ptype_base and ptype_all symbols
Date: Tue,  6 Aug 2013 01:32:51 -0600	[thread overview]
Message-ID: <1375774371-831-3-git-send-email-sakiwit@gmail.com> (raw)
In-Reply-To: <1375774371-831-1-git-send-email-sakiwit@gmail.com>

In commit 900ff8c6 ("net: move procfs code to net/core/net-procfs.c"),
it changed the correct linkage of ptype_base and ptype_all symbols to
the wrong one in net/core/dev.c, yet failed to change to the correct
linkage of those two in net/core/net-procfs.c.

Fix the wrong linkage by setting static specifier to both sets of the
symbols so that they could have coherent internal linkage by themselves
to avoid interference with each other.

Signed-off-by: Jean Sacren <sakiwit@gmail.com>
---
 net/core/dev.c        | 4 ++--
 net/core/net-procfs.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index dfd9f5d..d85e5e1 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -142,8 +142,8 @@
 
 static DEFINE_SPINLOCK(ptype_lock);
 static DEFINE_SPINLOCK(offload_lock);
-struct list_head ptype_base[PTYPE_HASH_SIZE] __read_mostly;
-struct list_head ptype_all __read_mostly;	/* Taps */
+static struct list_head ptype_base[PTYPE_HASH_SIZE] __read_mostly;
+static struct list_head ptype_all __read_mostly;	/* Taps */
 static struct list_head offload_base __read_mostly;
 
 /*
diff --git a/net/core/net-procfs.c b/net/core/net-procfs.c
index 2bf8329..e57cd63 100644
--- a/net/core/net-procfs.c
+++ b/net/core/net-procfs.c
@@ -9,8 +9,8 @@
 #define get_offset(x) ((x) & ((1 << BUCKET_SPACE) - 1))
 #define set_bucket_offset(b, o) ((b) << BUCKET_SPACE | (o))
 
-extern struct list_head ptype_all __read_mostly;
-extern struct list_head ptype_base[PTYPE_HASH_SIZE] __read_mostly;
+static struct list_head ptype_all __read_mostly;
+static struct list_head ptype_base[PTYPE_HASH_SIZE] __read_mostly;
 
 static inline struct net_device *dev_from_same_bucket(struct seq_file *seq, loff_t *pos)
 {

  parent reply	other threads:[~2013-08-06  7:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-06  7:32 [PATCH net-next 1/3] sock: fix a typo in the comment Jean Sacren
2013-08-06  7:32 ` [PATCH net-next 2/3] netdevice: remove useless else keyword Jean Sacren
2013-08-06  8:20   ` Daniel Borkmann
2013-08-06 14:37     ` Joe Perches
2013-08-06  7:32 ` Jean Sacren [this message]
2013-08-06  8:13   ` [PATCH net-next 3/3] net: core: fix wrong linkage for ptype_base and ptype_all symbols Daniel Borkmann
2013-08-06 20:45     ` Jean Sacren
2013-08-06 21:06       ` Eric Dumazet
2013-08-07  4:00         ` Jean Sacren

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=1375774371-831-3-git-send-email-sakiwit@gmail.com \
    --to=sakiwit@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).