* Re: [2.6 patch] net/ipx/: make some code static
2004-12-15 0:59 [2.6 patch] net/ipx/: make some code static Adrian Bunk
@ 2004-12-15 0:03 ` Arnaldo Carvalho de Melo
2004-12-28 3:21 ` David S. Miller
1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2004-12-15 0:03 UTC (permalink / raw)
To: Adrian Bunk; +Cc: linux-net, netdev, linux-kernel
ACKed, this was because a long time ago I planned to ressurect the SPX code.
- Arnaldo
Adrian Bunk wrote:
> The patch below makes some needlessly global code static.
>
>
> diffstat output:
> include/net/ipx.h | 8 --------
> net/ipx/af_ipx.c | 10 ++++++++--
> net/ipx/ipx_proc.c | 6 +++---
> 3 files changed, 11 insertions(+), 13 deletions(-)
>
>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
>
> --- linux-2.6.10-rc3-mm1-full/include/net/ipx.h.old 2004-12-14 14:55:42.000000000 +0100
> +++ linux-2.6.10-rc3-mm1-full/include/net/ipx.h 2004-12-14 14:57:03.000000000 +0100
> @@ -139,14 +139,6 @@
> ipxitf_down(intrfc);
> }
>
> -extern void __ipxitf_down(struct ipx_interface *intrfc);
> -
> -static __inline__ void __ipxitf_put(struct ipx_interface *intrfc)
> -{
> - if (atomic_dec_and_test(&intrfc->refcnt))
> - __ipxitf_down(intrfc);
> -}
> -
> static __inline__ void ipxrtr_hold(struct ipx_route *rt)
> {
> atomic_inc(&rt->refcnt);
> --- linux-2.6.10-rc3-mm1-full/net/ipx/af_ipx.c.old 2004-12-14 14:56:12.000000000 +0100
> +++ linux-2.6.10-rc3-mm1-full/net/ipx/af_ipx.c 2004-12-14 14:57:28.000000000 +0100
> @@ -291,7 +291,7 @@
> }
> #endif
>
> -void __ipxitf_down(struct ipx_interface *intrfc)
> +static void __ipxitf_down(struct ipx_interface *intrfc)
> {
> struct sock *s;
> struct hlist_node *node, *t;
> @@ -335,6 +335,12 @@
> spin_unlock_bh(&ipx_interfaces_lock);
> }
>
> +static __inline__ void __ipxitf_put(struct ipx_interface *intrfc)
> +{
> + if (atomic_dec_and_test(&intrfc->refcnt))
> + __ipxitf_down(intrfc);
> +}
> +
> static int ipxitf_device_event(struct notifier_block *notifier,
> unsigned long event, void *ptr)
> {
> @@ -1629,7 +1635,7 @@
> return rc;
> }
>
> -int ipx_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt)
> +static int ipx_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt)
> {
> /* NULL here for pt means the packet was looped back */
> struct ipx_interface *intrfc;
> --- linux-2.6.10-rc3-mm1-full/net/ipx/ipx_proc.c.old 2004-12-14 14:57:40.000000000 +0100
> +++ linux-2.6.10-rc3-mm1-full/net/ipx/ipx_proc.c 2004-12-14 14:57:56.000000000 +0100
> @@ -287,21 +287,21 @@
> return 0;
> }
>
> -struct seq_operations ipx_seq_interface_ops = {
> +static struct seq_operations ipx_seq_interface_ops = {
> .start = ipx_seq_interface_start,
> .next = ipx_seq_interface_next,
> .stop = ipx_seq_interface_stop,
> .show = ipx_seq_interface_show,
> };
>
> -struct seq_operations ipx_seq_route_ops = {
> +static struct seq_operations ipx_seq_route_ops = {
> .start = ipx_seq_route_start,
> .next = ipx_seq_route_next,
> .stop = ipx_seq_route_stop,
> .show = ipx_seq_route_show,
> };
>
> -struct seq_operations ipx_seq_socket_ops = {
> +static struct seq_operations ipx_seq_socket_ops = {
> .start = ipx_seq_socket_start,
> .next = ipx_seq_socket_next,
> .stop = ipx_seq_interface_stop,
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [2.6 patch] net/ipx/: make some code static
@ 2004-12-15 0:59 Adrian Bunk
2004-12-15 0:03 ` Arnaldo Carvalho de Melo
2004-12-28 3:21 ` David S. Miller
0 siblings, 2 replies; 3+ messages in thread
From: Adrian Bunk @ 2004-12-15 0:59 UTC (permalink / raw)
To: acme; +Cc: linux-net, netdev, linux-kernel
The patch below makes some needlessly global code static.
diffstat output:
include/net/ipx.h | 8 --------
net/ipx/af_ipx.c | 10 ++++++++--
net/ipx/ipx_proc.c | 6 +++---
3 files changed, 11 insertions(+), 13 deletions(-)
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.10-rc3-mm1-full/include/net/ipx.h.old 2004-12-14 14:55:42.000000000 +0100
+++ linux-2.6.10-rc3-mm1-full/include/net/ipx.h 2004-12-14 14:57:03.000000000 +0100
@@ -139,14 +139,6 @@
ipxitf_down(intrfc);
}
-extern void __ipxitf_down(struct ipx_interface *intrfc);
-
-static __inline__ void __ipxitf_put(struct ipx_interface *intrfc)
-{
- if (atomic_dec_and_test(&intrfc->refcnt))
- __ipxitf_down(intrfc);
-}
-
static __inline__ void ipxrtr_hold(struct ipx_route *rt)
{
atomic_inc(&rt->refcnt);
--- linux-2.6.10-rc3-mm1-full/net/ipx/af_ipx.c.old 2004-12-14 14:56:12.000000000 +0100
+++ linux-2.6.10-rc3-mm1-full/net/ipx/af_ipx.c 2004-12-14 14:57:28.000000000 +0100
@@ -291,7 +291,7 @@
}
#endif
-void __ipxitf_down(struct ipx_interface *intrfc)
+static void __ipxitf_down(struct ipx_interface *intrfc)
{
struct sock *s;
struct hlist_node *node, *t;
@@ -335,6 +335,12 @@
spin_unlock_bh(&ipx_interfaces_lock);
}
+static __inline__ void __ipxitf_put(struct ipx_interface *intrfc)
+{
+ if (atomic_dec_and_test(&intrfc->refcnt))
+ __ipxitf_down(intrfc);
+}
+
static int ipxitf_device_event(struct notifier_block *notifier,
unsigned long event, void *ptr)
{
@@ -1629,7 +1635,7 @@
return rc;
}
-int ipx_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt)
+static int ipx_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt)
{
/* NULL here for pt means the packet was looped back */
struct ipx_interface *intrfc;
--- linux-2.6.10-rc3-mm1-full/net/ipx/ipx_proc.c.old 2004-12-14 14:57:40.000000000 +0100
+++ linux-2.6.10-rc3-mm1-full/net/ipx/ipx_proc.c 2004-12-14 14:57:56.000000000 +0100
@@ -287,21 +287,21 @@
return 0;
}
-struct seq_operations ipx_seq_interface_ops = {
+static struct seq_operations ipx_seq_interface_ops = {
.start = ipx_seq_interface_start,
.next = ipx_seq_interface_next,
.stop = ipx_seq_interface_stop,
.show = ipx_seq_interface_show,
};
-struct seq_operations ipx_seq_route_ops = {
+static struct seq_operations ipx_seq_route_ops = {
.start = ipx_seq_route_start,
.next = ipx_seq_route_next,
.stop = ipx_seq_route_stop,
.show = ipx_seq_route_show,
};
-struct seq_operations ipx_seq_socket_ops = {
+static struct seq_operations ipx_seq_socket_ops = {
.start = ipx_seq_socket_start,
.next = ipx_seq_socket_next,
.stop = ipx_seq_interface_stop,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [2.6 patch] net/ipx/: make some code static
2004-12-15 0:59 [2.6 patch] net/ipx/: make some code static Adrian Bunk
2004-12-15 0:03 ` Arnaldo Carvalho de Melo
@ 2004-12-28 3:21 ` David S. Miller
1 sibling, 0 replies; 3+ messages in thread
From: David S. Miller @ 2004-12-28 3:21 UTC (permalink / raw)
To: Adrian Bunk; +Cc: acme, linux-net, netdev, linux-kernel
On Wed, 15 Dec 2004 01:59:25 +0100
Adrian Bunk <bunk@stusta.de> wrote:
> The patch below makes some needlessly global code static.
Applied, thanks Adrian.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-12-28 3:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-15 0:59 [2.6 patch] net/ipx/: make some code static Adrian Bunk
2004-12-15 0:03 ` Arnaldo Carvalho de Melo
2004-12-28 3:21 ` David S. Miller
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).