* [PATCH 2.6.24-rc2] net: net_free implicit declaration
@ 2007-11-07 3:06 Randy Dunlap
2007-11-07 3:17 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2007-11-07 3:06 UTC (permalink / raw)
To: netdev; +Cc: davem, akpm, torvalds
From: Randy Dunlap <randy.dunlap@oracle.com>
Just move the function so that is it known before it is used.
net/core/net_namespace.c: In function 'copy_net_ns':
net/core/net_namespace.c:97: error: implicit declaration of function 'net_free'
net/core/net_namespace.c: At top level:
net/core/net_namespace.c:104: warning: conflicting types for 'net_free'
net/core/net_namespace.c:104: error: static declaration of 'net_free' follows non-static declaration
net/core/net_namespace.c:97: error: previous implicit declaration of 'net_free' was here
make[2]: *** [net/core/net_namespace.o] Error 1
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
net/core/net_namespace.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
--- linux-2.6.24-rc2.orig/net/core/net_namespace.c
+++ linux-2.6.24-rc2/net/core/net_namespace.c
@@ -64,6 +64,20 @@ static struct net *net_alloc(void)
return kmem_cache_zalloc(net_cachep, GFP_KERNEL);
}
+static void net_free(struct net *net)
+{
+ if (!net)
+ return;
+
+ if (unlikely(atomic_read(&net->use_count) != 0)) {
+ printk(KERN_EMERG "network namespace not free! Usage: %d\n",
+ atomic_read(&net->use_count));
+ return;
+ }
+
+ kmem_cache_free(net_cachep, net);
+}
+
struct net *copy_net_ns(unsigned long flags, struct net *old_net)
{
struct net *new_net = NULL;
@@ -100,20 +114,6 @@ out:
return new_net;
}
-static void net_free(struct net *net)
-{
- if (!net)
- return;
-
- if (unlikely(atomic_read(&net->use_count) != 0)) {
- printk(KERN_EMERG "network namespace not free! Usage: %d\n",
- atomic_read(&net->use_count));
- return;
- }
-
- kmem_cache_free(net_cachep, net);
-}
-
static void cleanup_net(struct work_struct *work)
{
struct pernet_operations *ops;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 2.6.24-rc2] net: net_free implicit declaration
2007-11-07 3:06 [PATCH 2.6.24-rc2] net: net_free implicit declaration Randy Dunlap
@ 2007-11-07 3:17 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-11-07 3:17 UTC (permalink / raw)
To: randy.dunlap; +Cc: netdev, akpm, torvalds
From: Randy Dunlap <randy.dunlap@oracle.com>
Date: Tue, 6 Nov 2007 19:06:29 -0800
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> Just move the function so that is it known before it is used.
>
> net/core/net_namespace.c: In function 'copy_net_ns':
> net/core/net_namespace.c:97: error: implicit declaration of function 'net_free'
> net/core/net_namespace.c: At top level:
> net/core/net_namespace.c:104: warning: conflicting types for 'net_free'
> net/core/net_namespace.c:104: error: static declaration of 'net_free' follows non-static declaration
> net/core/net_namespace.c:97: error: previous implicit declaration of 'net_free' was here
> make[2]: *** [net/core/net_namespace.o] Error 1
>
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
This is already fixed in the net-2.6 tree.
I'll push it to Linus after I'm done sorting another bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-11-07 3:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-07 3:06 [PATCH 2.6.24-rc2] net: net_free implicit declaration Randy Dunlap
2007-11-07 3:17 ` David 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).