mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
synced 2025-09-15 00:56:46 +10:00
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>
This commit is contained in:
parent
e5cd429e79
commit
e08190ef51
@ -84,7 +84,7 @@ void bond_debug_reregister(struct bonding *bond)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void bond_create_debugfs(void)
|
void __init bond_create_debugfs(void)
|
||||||
{
|
{
|
||||||
bonding_debug_root = debugfs_create_dir("bonding", NULL);
|
bonding_debug_root = debugfs_create_dir("bonding", NULL);
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ void bond_debug_reregister(struct bonding *bond)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void bond_create_debugfs(void)
|
void __init bond_create_debugfs(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5981,7 +5981,7 @@ static void bond_uninit(struct net_device *bond_dev)
|
|||||||
|
|
||||||
/*------------------------- Module initialization ---------------------------*/
|
/*------------------------- Module initialization ---------------------------*/
|
||||||
|
|
||||||
static int bond_check_params(struct bond_params *params)
|
static int __init bond_check_params(struct bond_params *params)
|
||||||
{
|
{
|
||||||
int arp_validate_value, fail_over_mac_value, primary_reselect_value, i;
|
int arp_validate_value, fail_over_mac_value, primary_reselect_value, i;
|
||||||
struct bond_opt_value newval;
|
struct bond_opt_value newval;
|
||||||
|
@ -803,7 +803,7 @@ static const struct attribute_group bonding_group = {
|
|||||||
/* Initialize sysfs. This sets up the bonding_masters file in
|
/* Initialize sysfs. This sets up the bonding_masters file in
|
||||||
* /sys/class/net.
|
* /sys/class/net.
|
||||||
*/
|
*/
|
||||||
int bond_create_sysfs(struct bond_net *bn)
|
int __net_init bond_create_sysfs(struct bond_net *bn)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -836,7 +836,7 @@ int bond_create_sysfs(struct bond_net *bn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Remove /sys/class/net/bonding_masters. */
|
/* Remove /sys/class/net/bonding_masters. */
|
||||||
void bond_destroy_sysfs(struct bond_net *bn)
|
void __net_exit bond_destroy_sysfs(struct bond_net *bn)
|
||||||
{
|
{
|
||||||
netdev_class_remove_file_ns(&bn->class_attr_bonding_masters, bn->net);
|
netdev_class_remove_file_ns(&bn->class_attr_bonding_masters, bn->net);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user