Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bonding: add modifier to initialization function and exit function

Some functions are only used in initialization and exit functions, so add
the __init/__net_init and __net_exit modifiers to these functions.

Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Zhengchao Shao and committed by
David S. Miller
e08190ef e5cd429e

+5 -5
+2 -2
drivers/net/bonding/bond_debugfs.c
··· 84 84 } 85 85 } 86 86 87 - void bond_create_debugfs(void) 87 + void __init bond_create_debugfs(void) 88 88 { 89 89 bonding_debug_root = debugfs_create_dir("bonding", NULL); 90 90 ··· 113 113 { 114 114 } 115 115 116 - void bond_create_debugfs(void) 116 + void __init bond_create_debugfs(void) 117 117 { 118 118 } 119 119
+1 -1
drivers/net/bonding/bond_main.c
··· 5981 5981 5982 5982 /*------------------------- Module initialization ---------------------------*/ 5983 5983 5984 - static int bond_check_params(struct bond_params *params) 5984 + static int __init bond_check_params(struct bond_params *params) 5985 5985 { 5986 5986 int arp_validate_value, fail_over_mac_value, primary_reselect_value, i; 5987 5987 struct bond_opt_value newval;
+2 -2
drivers/net/bonding/bond_sysfs.c
··· 803 803 /* Initialize sysfs. This sets up the bonding_masters file in 804 804 * /sys/class/net. 805 805 */ 806 - int bond_create_sysfs(struct bond_net *bn) 806 + int __net_init bond_create_sysfs(struct bond_net *bn) 807 807 { 808 808 int ret; 809 809 ··· 836 836 } 837 837 838 838 /* Remove /sys/class/net/bonding_masters. */ 839 - void bond_destroy_sysfs(struct bond_net *bn) 839 + void __net_exit bond_destroy_sysfs(struct bond_net *bn) 840 840 { 841 841 netdev_class_remove_file_ns(&bn->class_attr_bonding_masters, bn->net); 842 842 }