Skip to content

Commit a37ae40

Browse files
xemulDavid S. Miller
authored andcommitted
[NET]: Don't declare extern variables in net/core/sysctl_net_core.c
Some are already declared in include/linux/netdevice.h, while some others (xfrm ones) need to be declared. The driver/net/rrunner.c just uses same extern as well, so cleanup it also. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent c1bd24b commit a37ae40

3 files changed

Lines changed: 7 additions & 20 deletions

File tree

‎drivers/net/rrunner.c‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,10 @@ static char version[] __devinitdata = "rrunner.c: v0.50 11/11/2002 Jes Sorensen
7979
*/
8080

8181
/*
82-
* These are checked at init time to see if they are at least 256KB
83-
* and increased to 256KB if they are not. This is done to avoid ending
84-
* up with socket buffers smaller than the MTU size,
82+
* sysctl_[wr]mem_max are checked at init time to see if they are at
83+
* least 256KB and increased to 256KB if they are not. This is done to
84+
* avoid ending up with socket buffers smaller than the MTU size,
8585
*/
86-
extern __u32 sysctl_wmem_max;
87-
extern __u32 sysctl_rmem_max;
8886

8987
static int __devinit rr_init_one(struct pci_dev *pdev,
9088
const struct pci_device_id *ent)

‎include/net/xfrm.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
extern struct sock *xfrm_nl;
3838
extern u32 sysctl_xfrm_aevent_etime;
3939
extern u32 sysctl_xfrm_aevent_rseqth;
40+
extern int sysctl_xfrm_larval_drop;
41+
extern u32 sysctl_xfrm_acq_expires;
4042

4143
extern struct mutex xfrm_cfg_mutex;
4244

‎net/core/sysctl_net_core.c‎

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,12 @@
99
#include <linux/sysctl.h>
1010
#include <linux/module.h>
1111
#include <linux/socket.h>
12+
#include <linux/netdevice.h>
1213
#include <net/sock.h>
14+
#include <net/xfrm.h>
1315

1416
#ifdef CONFIG_SYSCTL
1517

16-
extern int netdev_max_backlog;
17-
extern int weight_p;
18-
19-
extern __u32 sysctl_wmem_max;
20-
extern __u32 sysctl_rmem_max;
21-
22-
extern int sysctl_core_destroy_delay;
23-
24-
#ifdef CONFIG_XFRM
25-
extern u32 sysctl_xfrm_aevent_etime;
26-
extern u32 sysctl_xfrm_aevent_rseqth;
27-
extern int sysctl_xfrm_larval_drop;
28-
extern u32 sysctl_xfrm_acq_expires;
29-
#endif
30-
3118
ctl_table core_table[] = {
3219
#ifdef CONFIG_NET
3320
{

0 commit comments

Comments
 (0)