* [PATCH 2/3] Remove in-code externs for some functions from net/core/dev.c
@ 2007-10-22 15:25 Pavel Emelyanov
2007-10-24 4:14 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Pavel Emelyanov @ 2007-10-22 15:25 UTC (permalink / raw)
To: David Miller; +Cc: Linux Netdev List, devel
Inconsistent prototype and real type for functions may have
worse consequences, than those for variables, so move them
into a header.
Since they are used privately in net/core, make this file
reside in the same place.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
---
diff --git a/net/core/dev.c b/net/core/dev.c
index 8726589..9ea3665 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -120,6 +120,8 @@
#include <linux/ctype.h>
#include <linux/if_arp.h>
+#include "net-sysfs.h"
+
/*
* The list of packet types we will receive (as opposed to discard)
* and the routines to invoke.
@@ -249,10 +251,6 @@ static RAW_NOTIFIER_HEAD(netdev_chain);
DEFINE_PER_CPU(struct softnet_data, softnet_data);
-extern int netdev_kobject_init(void);
-extern int netdev_register_kobject(struct net_device *);
-extern void netdev_unregister_kobject(struct net_device *);
-
#ifdef CONFIG_DEBUG_LOCK_ALLOC
/*
* register_netdevice() inits dev->_xmit_lock and sets lockdep class
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 6628e45..61ead1d 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -18,6 +18,8 @@
#include <linux/wireless.h>
#include <net/iw_handler.h>
+#include "net-sysfs.h"
+
#ifdef CONFIG_SYSFS
static const char fmt_hex[] = "%#x\n";
static const char fmt_long_hex[] = "%#lx\n";
diff --git a/net/core/net-sysfs.h b/net/core/net-sysfs.h
new file mode 100644
index 0000000..a41683d
--- /dev/null
+++ b/net/core/net-sysfs.h
@@ -0,0 +1,8 @@
+#ifndef __NET_SYSFS_H__
+#define __NET_SYSFS_H__
+
+int netdev_kobject_init(void);
+int netdev_register_kobject(struct net_device *);
+void netdev_unregister_kobject(struct net_device *);
+
+#endif
--
1.5.3.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/3] Remove in-code externs for some functions from net/core/dev.c
2007-10-22 15:25 [PATCH 2/3] Remove in-code externs for some functions from net/core/dev.c Pavel Emelyanov
@ 2007-10-24 4:14 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-10-24 4:14 UTC (permalink / raw)
To: xemul; +Cc: netdev, devel
From: Pavel Emelyanov <xemul@openvz.org>
Date: Mon, 22 Oct 2007 19:25:50 +0400
> Inconsistent prototype and real type for functions may have
> worse consequences, than those for variables, so move them
> into a header.
>
> Since they are used privately in net/core, make this file
> reside in the same place.
>
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-10-24 4:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-22 15:25 [PATCH 2/3] Remove in-code externs for some functions from net/core/dev.c Pavel Emelyanov
2007-10-24 4:14 ` 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).