* [2.6 patch] net/ipv4/inetpeer.c: make a struct static @ 2005-03-15 14:44 Adrian Bunk 2005-03-16 22:53 ` David S. Miller 0 siblings, 1 reply; 5+ messages in thread From: Adrian Bunk @ 2005-03-15 14:44 UTC (permalink / raw) To: David S. Miller; +Cc: netdev, linux-kernel This patch makes a needlessly global struct static. Signed-off-by: Adrian Bunk <bunk@stusta.de> --- linux-2.6.11-mm3-full/net/ipv4/inetpeer.c.old 2005-03-15 13:29:32.000000000 +0100 +++ linux-2.6.11-mm3-full/net/ipv4/inetpeer.c 2005-03-15 13:30:13.000000000 +0100 @@ -92,9 +92,9 @@ int inet_peer_minttl = 120 * HZ; /* TTL under high load: 120 sec */ int inet_peer_maxttl = 10 * 60 * HZ; /* usual time to live: 10 min */ +static struct inet_peer *inet_peer_unused_head; /* Exported for inet_putpeer inline function. */ -struct inet_peer *inet_peer_unused_head, - **inet_peer_unused_tailp = &inet_peer_unused_head; +struct inet_peer **inet_peer_unused_tailp = &inet_peer_unused_head; DEFINE_SPINLOCK(inet_peer_unused_lock); #define PEER_MAX_CLEANUP_WORK 30 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [2.6 patch] net/ipv4/inetpeer.c: make a struct static 2005-03-15 14:44 [2.6 patch] net/ipv4/inetpeer.c: make a struct static Adrian Bunk @ 2005-03-16 22:53 ` David S. Miller 2005-03-16 22:54 ` David S. Miller 0 siblings, 1 reply; 5+ messages in thread From: David S. Miller @ 2005-03-16 22:53 UTC (permalink / raw) To: Adrian Bunk; +Cc: netdev, linux-kernel On Tue, 15 Mar 2005 15:44:08 +0100 Adrian Bunk <bunk@stusta.de> wrote: > This patch makes a needlessly global struct static. > > Signed-off-by: Adrian Bunk <bunk@stusta.de> You need to also kill the externs in net/inetpeer.h Please fix this up and resubmit. Thanks Adrian. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [2.6 patch] net/ipv4/inetpeer.c: make a struct static 2005-03-16 22:53 ` David S. Miller @ 2005-03-16 22:54 ` David S. Miller 2005-03-17 1:08 ` Adrian Bunk 0 siblings, 1 reply; 5+ messages in thread From: David S. Miller @ 2005-03-16 22:54 UTC (permalink / raw) To: David S. Miller; +Cc: bunk, netdev, linux-kernel On Wed, 16 Mar 2005 14:53:43 -0800 "David S. Miller" <davem@davemloft.net> wrote: > On Tue, 15 Mar 2005 15:44:08 +0100 > Adrian Bunk <bunk@stusta.de> wrote: > > > This patch makes a needlessly global struct static. > > > > Signed-off-by: Adrian Bunk <bunk@stusta.de> > > You need to also kill the externs in net/inetpeer.h > > Please fix this up and resubmit. Actually, Adrian, net/inetpeer.h makes use of inet_peer_unused_tailp in inline functions. How did you get a successful build after marking it static? ^ permalink raw reply [flat|nested] 5+ messages in thread
* [2.6 patch] net/ipv4/inetpeer.c: make a struct static 2005-03-16 22:54 ` David S. Miller @ 2005-03-17 1:08 ` Adrian Bunk 2005-03-17 4:40 ` David S. Miller 0 siblings, 1 reply; 5+ messages in thread From: Adrian Bunk @ 2005-03-17 1:08 UTC (permalink / raw) To: David S. Miller; +Cc: netdev, linux-kernel On Wed, Mar 16, 2005 at 02:54:48PM -0800, David S. Miller wrote: > On Wed, 16 Mar 2005 14:53:43 -0800 > "David S. Miller" <davem@davemloft.net> wrote: > > > On Tue, 15 Mar 2005 15:44:08 +0100 > > Adrian Bunk <bunk@stusta.de> wrote: > > > > > This patch makes a needlessly global struct static. > > > > > > Signed-off-by: Adrian Bunk <bunk@stusta.de> > > > > You need to also kill the externs in net/inetpeer.h > > > > Please fix this up and resubmit. > > Actually, Adrian, net/inetpeer.h makes use of > inet_peer_unused_tailp in inline functions. > > How did you get a successful build after marking > it static? I might be too dumb for reading the output of grep (inetpeer.h...), but I'm testing all my patches with two .config's that are roughly equivalent to allyesconfig and allmodconfig. inet_peer_unused_tailp might be referenced from other files via inetpeer.h, but inet_peer_unused_head isn't referenced directly from other files. cu Adrian <-- snip --> This patch makes a needlessly global struct static. Signed-off-by: Adrian Bunk <bunk@stusta.de> --- net/ipv4/inetpeer.c | 4 ++-- include/net/inetpeer.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) --- linux-2.6.11-mm3-full/net/ipv4/inetpeer.c.old 2005-03-15 13:29:32.000000000 +0100 +++ linux-2.6.11-mm3-full/net/ipv4/inetpeer.c 2005-03-15 13:30:13.000000000 +0100 @@ -92,9 +92,9 @@ int inet_peer_minttl = 120 * HZ; /* TTL under high load: 120 sec */ int inet_peer_maxttl = 10 * 60 * HZ; /* usual time to live: 10 min */ +static struct inet_peer *inet_peer_unused_head; /* Exported for inet_putpeer inline function. */ -struct inet_peer *inet_peer_unused_head, - **inet_peer_unused_tailp = &inet_peer_unused_head; +struct inet_peer **inet_peer_unused_tailp = &inet_peer_unused_head; DEFINE_SPINLOCK(inet_peer_unused_lock); #define PEER_MAX_CLEANUP_WORK 30 --- linux-2.6.11-mm4-full/include/net/inetpeer.h.old 2005-03-17 00:32:16.000000000 +0100 +++ linux-2.6.11-mm4-full/include/net/inetpeer.h 2005-03-17 00:32:26.000000000 +0100 @@ -35,7 +35,6 @@ struct inet_peer *inet_getpeer(__u32 daddr, int create); extern spinlock_t inet_peer_unused_lock; -extern struct inet_peer *inet_peer_unused_head; extern struct inet_peer **inet_peer_unused_tailp; /* can be called from BH context or outside */ static inline void inet_putpeer(struct inet_peer *p) ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [2.6 patch] net/ipv4/inetpeer.c: make a struct static 2005-03-17 1:08 ` Adrian Bunk @ 2005-03-17 4:40 ` David S. Miller 0 siblings, 0 replies; 5+ messages in thread From: David S. Miller @ 2005-03-17 4:40 UTC (permalink / raw) To: Adrian Bunk; +Cc: netdev, linux-kernel On Thu, 17 Mar 2005 02:08:21 +0100 Adrian Bunk <bunk@stusta.de> wrote: > inet_peer_unused_tailp might be referenced from other files via > inetpeer.h, but inet_peer_unused_head isn't referenced directly from > other files. I misread your patch, I thought you were marking both as static. My bad, sorry. I'll apply your patch, thanks. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-03-17 4:40 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-03-15 14:44 [2.6 patch] net/ipv4/inetpeer.c: make a struct static Adrian Bunk 2005-03-16 22:53 ` David S. Miller 2005-03-16 22:54 ` David S. Miller 2005-03-17 1:08 ` Adrian Bunk 2005-03-17 4:40 ` 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).