bonding: move procfs into bond_procfs.c
Subsystems (3)
PATCH 1/1 bonding: move procfs into bond_procfs.c
bond_main.c is bloating, separate the procfs code out, move them to bond_procfs.c
---
drivers/net/bonding/Makefile +1 -1
@@ -4,7 +4,7 @@ obj-$(CONFIG_BONDING) += bonding.o -bonding-objs := bond_main.o bond_3ad.o bond_alb.o bond_sysfs.o bond_debugfs.o +bonding-objs := bond_main.o bond_3ad.o bond_alb.o bond_sysfs.o bond_debugfs.o bond_procfs.o ipv6-$(subst m,y,$(CONFIG_IPV6)) += bond_ipv6.o bonding-objs += $(ipv6-y)
drivers/net/bonding/bond_main.c +2 -300
332 lines not on this page · raw message
drivers/net/bonding/bond_procfs.c new file +297 -0
297 lines not on this page · raw message
drivers/net/bonding/bonding.h +7 -0
@@ -29,6 +29,8 @@#define DRV_NAME "bonding"#define DRV_DESCRIPTION "Ethernet Channel Bonding Driver" +#define bond_version DRV_DESCRIPTION ": v" DRV_VERSION " (" DRV_RELDATE ")\n" +#define BOND_MAX_ARP_TARGETS 16#define IS_UP (dev) \
@@ -413,6 +415,11 @@ struct bond_net {#endif }; +void bond_create_proc_entry (struct bonding *bond); +void bond_remove_proc_entry (struct bonding *bond); +void bond_create_proc_dir (struct bond_net *bn); +void bond_destroy_proc_dir (struct bond_net *bn); +/* exported from bond_main.c */ extern int bond_net_id;extern const struct bond_parm_tbl bond_lacp_tbl[];
David Miller
maintainerFrom: Amerigo Wang <[email protected]>
Date: Mon, 28 Feb 2011 20:30:04 +0800
Quoted 4 lines
bond_main.cis bloating, separate the procfs code out, move them tobond_procfs.cSigned-off-by WANG Cong <[email protected]>
Please use Makefile rules to conditionally compile the new bond_procfs.o file, instead of wrapping almost the entire file with an ifdef.
Put the dummy no-PROC_FS function stubs, as inlines, in bonding.h
Thanks!
Quoted 6 lines · David Miller
From: Amerigo Wang<[email protected]>
Date: Mon, 28 Feb 2011 20:30:04 +0800Quoted 3 lines
bond_main.cis bloating, separate the procfs code out, move them tobond_procfs.c
Quoted 7 lines
Quoted 1 line
Signed-off-by WANG Cong<[email protected]>Please use
Makefilerules to conditionally compile the new bond_procfs.o file, instead of wrapping almost the entire file with an ifdef.Put the dummy no-PROC_FS function stubs, as inlines, in
bonding.h
Ok, will do it in the next update.
Thanks!