From: Denis Cheng <crquan@gmail.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: linux-kernel@vger.kernel.org, Denis Cheng <crquan@gmail.com>
Subject: [PATCH 4/4] [NET] move __dev_addr_discard adjacent to dev_addr_discard for readability
Date: Tue, 17 Jul 2007 16:23:25 +0800 [thread overview]
Message-ID: <11846606382771-git-send-email-crquan@gmail.com> (raw)
In-Reply-To: <11846606302073-git-send-email-crquan@gmail.com>
Signed-off-by: Denis Cheng <crquan@gmail.com>
---
net/core/dev.c | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 17c9cbd..6357f54 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2715,20 +2715,6 @@ int __dev_addr_add(struct dev_addr_list **list, int *count,
return 0;
}
-static void __dev_addr_discard(struct dev_addr_list **list)
-{
- struct dev_addr_list *tmp;
-
- while (*list != NULL) {
- tmp = *list;
- *list = tmp->next;
- if (tmp->da_users > tmp->da_gusers)
- printk("__dev_addr_discard: address leakage! "
- "da_users=%d\n", tmp->da_users);
- kfree(tmp);
- }
-}
-
/**
* dev_unicast_delete - Release secondary unicast address.
* @dev: device
@@ -2777,6 +2763,20 @@ int dev_unicast_add(struct net_device *dev, void *addr, int alen)
}
EXPORT_SYMBOL(dev_unicast_add);
+static void __dev_addr_discard(struct dev_addr_list **list)
+{
+ struct dev_addr_list *tmp;
+
+ while (*list != NULL) {
+ tmp = *list;
+ *list = tmp->next;
+ if (tmp->da_users > tmp->da_gusers)
+ printk("__dev_addr_discard: address leakage! "
+ "da_users=%d\n", tmp->da_users);
+ kfree(tmp);
+ }
+}
+
static void dev_addr_discard(struct net_device *dev)
{
netif_tx_lock_bh(dev);
--
1.5.2.2
next prev parent reply other threads:[~2007-07-17 8:25 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-17 8:23 [PATCH 1/4] [NET] move dev_mc_discard from dev_mcast.c to dev.c Denis Cheng
2007-07-17 8:23 ` [PATCH 2/4] [NET] make non-global function __dev_addr_discard static Denis Cheng
2007-07-17 8:23 ` [PATCH 3/4] [NET] merge dev_unicast_discard and dev_mc_discard into one Denis Cheng
2007-07-17 8:23 ` Denis Cheng [this message]
2007-07-18 2:41 ` [PATCH 1/3] [net/core] move dev_mc_discard from dev_mcast.c to dev.c Denis Cheng
2007-07-18 2:41 ` [PATCH 2/3] [net/core] merge dev_unicast_discard and dev_mc_discard into one Denis Cheng
2007-07-18 2:41 ` [PATCH 3/3] [net/core] move __dev_addr_discard adjacent to dev_addr_discard for readability Denis Cheng
2007-07-18 9:13 ` David Miller
2007-07-18 9:12 ` [PATCH 2/3] [net/core] merge dev_unicast_discard and dev_mc_discard into one David Miller
2007-07-18 9:11 ` [PATCH 1/3] [net/core] move dev_mc_discard from dev_mcast.c to dev.c David Miller
2007-07-18 9:59 ` rae l
2007-07-18 10:01 ` Patrick McHardy
2007-07-18 10:04 ` David Miller
2007-07-18 10:10 ` Patrick McHardy
2007-07-18 10:03 ` David Miller
2007-07-18 11:30 ` [PATCH 1/2] net/core: merge the content of dev_mcast.c into dev.c Denis Cheng
2007-07-18 11:30 ` [PATCH 2/2] net/core: some functions' definition order adjustment for readability Denis Cheng
2007-07-18 12:39 ` Patrick McHardy
2007-07-18 14:31 ` rae l
2007-07-20 1:51 ` [PATCH 1/2] net/core: merge the content of dev_mcast.c into dev.c rae l
2007-07-20 3:04 ` David Miller
2007-07-20 3:22 ` rae l
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=11846606382771-git-send-email-crquan@gmail.com \
--to=crquan@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.