From: Adrian Bunk <bunk@stusta.de>
To: Andrew Morton <akpm@linux-foundation.org>,
David Miller <davem@davemloft.net>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: [-mm patch] net/: possible cleanups
Date: Wed, 4 Apr 2007 17:25:43 +0200 [thread overview]
Message-ID: <20070404152543.GM27660@stusta.de> (raw)
In-Reply-To: <20070402224745.71a25af7.akpm@linux-foundation.org>
On Mon, Apr 02, 2007 at 10:47:45PM -0700, Andrew Morton wrote:
>...
> Changes since 2.6.21-rc5-mm3:
>...
> git-net.patch
>...
> git trees.
>...
This patch contains the following possible cleanups:
- make the following needlessly global variables static:
- core/rtnetlink.c: struct rtnl_msg_handlers[]
- netfilter/nf_conntrack_proto.c: struct nf_ct_protos[]
- make the following needlessly global functions static:
- core/rtnetlink.c: rtnl_dump_all()
- netlink/af_netlink.c: netlink_queue_skip()
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
include/net/netfilter/nf_conntrack_l4proto.h | 1 -
include/net/netlink.h | 2 --
include/net/rtnetlink.h | 1 -
net/core/rtnetlink.c | 6 ++----
net/netfilter/nf_conntrack_proto.c | 2 +-
net/netlink/af_netlink.c | 4 ++--
6 files changed, 5 insertions(+), 11 deletions(-)
--- linux-2.6.21-rc5-mm4/include/net/rtnetlink.h.old 2007-04-03 23:58:30.000000000 +0200
+++ linux-2.6.21-rc5-mm4/include/net/rtnetlink.h 2007-04-03 23:58:35.000000000 +0200
@@ -13,7 +13,6 @@
rtnl_doit_func, rtnl_dumpit_func);
extern int rtnl_unregister(int protocol, int msgtype);
extern void rtnl_unregister_all(int protocol);
-extern int rtnl_dump_all(struct sk_buff *skb, struct netlink_callback *cb);
static inline int rtnl_msg_family(struct nlmsghdr *nlh)
{
--- linux-2.6.21-rc5-mm4/net/core/rtnetlink.c.old 2007-04-03 23:34:49.000000000 +0200
+++ linux-2.6.21-rc5-mm4/net/core/rtnetlink.c 2007-04-03 23:58:44.000000000 +0200
@@ -101,7 +101,7 @@
return 0;
}
-struct rtnl_link *rtnl_msg_handlers[NPROTO];
+static struct rtnl_link *rtnl_msg_handlers[NPROTO];
static inline int rtm_msgindex(int msgtype)
{
@@ -771,7 +771,7 @@
return err;
}
-int rtnl_dump_all(struct sk_buff *skb, struct netlink_callback *cb)
+static int rtnl_dump_all(struct sk_buff *skb, struct netlink_callback *cb)
{
int idx;
int s_idx = cb->family;
@@ -795,8 +795,6 @@
return skb->len;
}
-EXPORT_SYMBOL_GPL(rtnl_dump_all);
-
void rtmsg_ifinfo(int type, struct net_device *dev, unsigned change)
{
struct sk_buff *skb;
--- linux-2.6.21-rc5-mm4/include/net/netfilter/nf_conntrack_l4proto.h.old 2007-04-04 01:22:41.000000000 +0200
+++ linux-2.6.21-rc5-mm4/include/net/netfilter/nf_conntrack_l4proto.h 2007-04-04 01:22:50.000000000 +0200
@@ -97,7 +97,6 @@
extern struct nf_conntrack_l4proto nf_conntrack_l4proto_generic;
#define MAX_NF_CT_PROTO 256
-extern struct nf_conntrack_l4proto **nf_ct_protos[PF_MAX];
extern struct nf_conntrack_l4proto *
__nf_ct_l4proto_find(u_int16_t l3proto, u_int8_t l4proto);
--- linux-2.6.21-rc5-mm4/net/netfilter/nf_conntrack_proto.c.old 2007-04-04 00:00:26.000000000 +0200
+++ linux-2.6.21-rc5-mm4/net/netfilter/nf_conntrack_proto.c 2007-04-04 00:00:43.000000000 +0200
@@ -28,7 +28,7 @@
#include <net/netfilter/nf_conntrack_l4proto.h>
#include <net/netfilter/nf_conntrack_core.h>
-struct nf_conntrack_l4proto **nf_ct_protos[PF_MAX] __read_mostly;
+static struct nf_conntrack_l4proto **nf_ct_protos[PF_MAX] __read_mostly;
struct nf_conntrack_l3proto *nf_ct_l3protos[AF_MAX] __read_mostly;
EXPORT_SYMBOL_GPL(nf_ct_l3protos);
--- linux-2.6.21-rc5-mm4/include/net/netlink.h.old 2007-04-04 00:01:21.000000000 +0200
+++ linux-2.6.21-rc5-mm4/include/net/netlink.h 2007-04-04 00:01:52.000000000 +0200
@@ -217,8 +217,6 @@
extern void netlink_run_queue(struct sock *sk, unsigned int *qlen,
int (*cb)(struct sk_buff *,
struct nlmsghdr *));
-extern void netlink_queue_skip(struct nlmsghdr *nlh,
- struct sk_buff *skb);
extern int nlmsg_notify(struct sock *sk, struct sk_buff *skb,
u32 pid, unsigned int group, int report,
gfp_t flags);
--- linux-2.6.21-rc5-mm4/net/netlink/af_netlink.c.old 2007-04-04 00:01:59.000000000 +0200
+++ linux-2.6.21-rc5-mm4/net/netlink/af_netlink.c 2007-04-04 00:02:22.000000000 +0200
@@ -117,6 +117,7 @@
static int netlink_dump(struct sock *sk);
static void netlink_destroy_callback(struct netlink_callback *cb);
+static void netlink_queue_skip(struct nlmsghdr *nlh, struct sk_buff *skb);
static DEFINE_RWLOCK(nl_table_lock);
static atomic_t nl_table_users = ATOMIC_INIT(0);
@@ -1555,7 +1556,7 @@
* Pulls the given netlink message off the socket buffer so the next
* call to netlink_queue_run() will not reconsider the message.
*/
-void netlink_queue_skip(struct nlmsghdr *nlh, struct sk_buff *skb)
+static void netlink_queue_skip(struct nlmsghdr *nlh, struct sk_buff *skb)
{
int msglen = NLMSG_ALIGN(nlh->nlmsg_len);
@@ -1838,7 +1839,6 @@
EXPORT_SYMBOL(netlink_ack);
EXPORT_SYMBOL(netlink_run_queue);
-EXPORT_SYMBOL(netlink_queue_skip);
EXPORT_SYMBOL(netlink_broadcast);
EXPORT_SYMBOL(netlink_dump_start);
EXPORT_SYMBOL(netlink_kernel_create);
next prev parent reply other threads:[~2007-04-04 15:25 UTC|newest]
Thread overview: 89+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-03 5:47 2.6.21-rc5-mm4 Andrew Morton
2007-04-03 12:57 ` 2.6.21-rc5-mm4 Jiri Kosina
2007-04-03 15:11 ` 2.6.21-rc5-mm4 Kok, Auke
2007-04-03 16:30 ` 2.6.21-rc5-mm4 Jiri Kosina
2007-04-03 17:19 ` 2.6.21-rc5-mm4 Kok, Auke
2007-04-03 17:42 ` 2.6.21-rc5-mm4 Jiri Kosina
2007-04-04 16:10 ` 2.6.21-rc5-mm4 Jiri Kosina
2007-04-04 17:22 ` 2.6.21-rc5-mm4 Eric W. Biederman
2007-04-06 13:23 ` 2.6.21-rc5-mm4 Jiri Kosina
2007-04-06 14:32 ` 2.6.21-rc5-mm4 Eric W. Biederman
2007-04-03 16:11 ` 2.6.21-rc5-mm4 Michal Piotrowski
2007-04-03 22:20 ` 2.6.21-rc5-mm4 Michal Piotrowski
2007-04-03 22:31 ` 2.6.21-rc5-mm4 Con Kolivas
2007-04-03 23:31 ` 2.6.21-rc5-mm4 Michal Piotrowski
2007-04-04 13:22 ` [PATCH] sched: implement staircase deadline cpu scheduler improvements fix Con Kolivas
2007-04-03 19:48 ` 2.6.21-rc5-mm4 Randy Dunlap
2007-04-03 19:51 ` 2.6.21-rc5-mm4 Davide Libenzi
2007-04-03 20:31 ` 2.6.21-rc5-mm4 Badari Pulavarty
2007-04-03 20:40 ` 2.6.21-rc5-mm4 Christoph Lameter
2007-04-03 22:53 ` 2.6.21-rc5-mm4 Badari Pulavarty
2007-04-03 22:59 ` 2.6.21-rc5-mm4 Christoph Lameter
2007-04-03 23:40 ` 2.6.21-rc5-mm4 Badari Pulavarty
2007-04-03 23:41 ` 2.6.21-rc5-mm4 Christoph Lameter
2007-04-04 1:16 ` 2.6.21-rc5-mm4 Christoph Lameter
2007-04-04 15:12 ` 2.6.21-rc5-mm4 Badari Pulavarty
2007-04-04 15:27 ` 2.6.21-rc5-mm4 Badari Pulavarty
2007-04-04 17:13 ` 2.6.21-rc5-mm4 (SLUB powerpc) Christoph Lameter
2007-04-04 17:33 ` Badari Pulavarty
2007-04-04 17:35 ` Christoph Lameter
2007-04-04 20:53 ` Badari Pulavarty
2007-04-03 21:55 ` 2.6.21-rc5-mm4 Badari Pulavarty
2007-04-03 23:19 ` 2.6.21-rc5-mm4 Badari Pulavarty
2007-04-03 23:27 ` 2.6.21-rc5-mm4 Christoph Lameter
2007-04-03 23:38 ` 2.6.21-rc5-mm4 Badari Pulavarty
2007-04-03 23:40 ` 2.6.21-rc5-mm4 Christoph Lameter
2007-04-03 23:51 ` 2.6.21-rc5-mm4 Badari Pulavarty
2007-04-03 23:55 ` 2.6.21-rc5-mm4 Christoph Lameter
2007-04-04 14:53 ` 2.6.21-rc5-mm4 Badari Pulavarty
2007-04-04 17:03 ` 2.6.21-rc5-mm4 (SLUB) Christoph Lameter
2007-04-04 18:02 ` Badari Pulavarty
2007-04-04 18:04 ` Christoph Lameter
2007-04-04 18:22 ` Christoph Lameter
2007-04-04 22:53 ` Badari Pulavarty
2007-04-04 22:59 ` Christoph Lameter
2007-04-04 23:42 ` Badari Pulavarty
2007-04-05 0:31 ` Christoph Lameter
2007-04-05 2:44 ` Badari Pulavarty
2007-04-05 3:15 ` Christoph Lameter
2007-04-05 4:29 ` Christoph Lameter
2007-04-05 15:16 ` Badari Pulavarty
2007-04-05 18:19 ` Christoph Lameter
2007-04-13 15:13 ` [PATCH] cache_k8_northbridges() overflows beyond allocation (Was: 2.6.21-rc5-mm4 (SLUB)) Badari Pulavarty
2007-04-13 15:45 ` Andi Kleen
2007-04-13 16:42 ` Chuck Ebbert
2007-04-13 16:52 ` Andi Kleen
2007-04-13 16:57 ` Andrew Morton
2007-04-13 18:07 ` Christoph Lameter
2007-04-04 18:09 ` 2.6.21-rc5-mm4 (SLUB) Christoph Lameter
2007-04-03 22:40 ` 2.6.21-rc5-mm4 J.A. Magallón
2007-04-03 22:51 ` 2.6.21-rc5-mm4 Andrew Morton
2007-04-03 22:51 ` 2.6.21-rc5-mm4 Andrew Morton
2007-04-03 22:58 ` 2.6.21-rc5-mm4 J.A. Magallón
2007-04-03 23:22 ` 2.6.21-rc5-mm4 Valdis.Kletnieks
2007-04-03 23:43 ` 2.6.21-rc5-mm4 J.A. Magallón
2007-04-04 1:35 ` 2.6.21-rc5-mm4 Valdis.Kletnieks
2007-04-04 2:20 ` 2.6.21-rc5-mm4 Randy Dunlap
2007-04-04 2:46 ` 2.6.21-rc5-mm4 Valdis.Kletnieks
2007-04-04 3:37 ` 2.6.21-rc5-mm4 Randy Dunlap
2007-04-04 17:55 ` 2.6.21-rc5-mm4 Valdis.Kletnieks
2007-04-05 11:14 ` 2.6.21-rc5-mm4 Sam Ravnborg
2007-04-04 15:25 ` Adrian Bunk [this message]
2007-04-04 15:25 ` [-mm patch] unexport pci_proc_attach_device Adrian Bunk
2007-04-04 21:56 ` 2.6.21-rc5-mm4 Antonino A. Daplas
2007-04-04 22:10 ` 2.6.21-rc5-mm4 Andrew Morton
2007-04-04 22:38 ` 2.6.21-rc5-mm4 Con Kolivas
2007-04-04 23:55 ` 2.6.21-rc5-mm4 Antonino A. Daplas
2007-04-05 0:56 ` 2.6.21-rc5-mm4 Antonino A. Daplas
2007-04-05 13:53 ` [-mm patch] pcm_native: lockdep warning when launching jack Frederik Deweerdt
2007-04-05 15:00 ` Takashi Iwai
2007-04-05 16:33 ` RAID1 "out of memory" error, was Re: 2.6.21-rc5-mm4 Reuben Farrelly
2007-04-05 20:21 ` Andrew Morton
2007-04-06 5:34 ` Dan Williams
2007-04-11 3:31 ` Neil Brown
2007-04-05 17:02 ` 2.6.21-rc5-mm4 Valdis.Kletnieks
2007-04-05 20:31 ` 2.6.21-rc5-mm4 Andrew Morton
2007-04-06 15:26 ` 2.6.21-rc5-mm4 Valdis.Kletnieks
2007-04-06 19:33 ` 2.6.21-rc5-mm4 Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2006-11-23 10:17 2.6.19-rc6-mm1 Andrew Morton
2006-11-24 21:58 ` [-mm patch] net/: possible cleanups Adrian Bunk
2006-12-01 1:28 ` 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=20070404152543.GM27660@stusta.de \
--to=bunk@stusta.de \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--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 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.