diff options
author | stephen hemminger <stephen@networkplumber.org> | 2014-03-04 19:34:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-06 16:08:52 -0500 |
commit | fca28094cd628e187520f412caa0fb687bfbc8d4 (patch) | |
tree | 958191f20ee104ad444ffca5fe38085d07c18a7d | |
parent | f7324acd98ce48fcde9783884ffe8c0b90899e5e (diff) |
bonding: remove dead code
These functions are defined but no longer used.
Compile tested only.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/bonding/bond_main.c | 46 | ||||
-rw-r--r-- | drivers/net/bonding/bonding.h | 2 |
2 files changed, 0 insertions, 48 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 730d72c706c9..e299c54ec185 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -3947,52 +3947,6 @@ static void bond_uninit(struct net_device *bond_dev) | |||
3947 | 3947 | ||
3948 | /*------------------------- Module initialization ---------------------------*/ | 3948 | /*------------------------- Module initialization ---------------------------*/ |
3949 | 3949 | ||
3950 | int bond_parm_tbl_lookup(int mode, const struct bond_parm_tbl *tbl) | ||
3951 | { | ||
3952 | int i; | ||
3953 | |||
3954 | for (i = 0; tbl[i].modename; i++) | ||
3955 | if (mode == tbl[i].mode) | ||
3956 | return tbl[i].mode; | ||
3957 | |||
3958 | return -1; | ||
3959 | } | ||
3960 | |||
3961 | static int bond_parm_tbl_lookup_name(const char *modename, | ||
3962 | const struct bond_parm_tbl *tbl) | ||
3963 | { | ||
3964 | int i; | ||
3965 | |||
3966 | for (i = 0; tbl[i].modename; i++) | ||
3967 | if (strcmp(modename, tbl[i].modename) == 0) | ||
3968 | return tbl[i].mode; | ||
3969 | |||
3970 | return -1; | ||
3971 | } | ||
3972 | |||
3973 | /* | ||
3974 | * Convert string input module parms. Accept either the | ||
3975 | * number of the mode or its string name. A bit complicated because | ||
3976 | * some mode names are substrings of other names, and calls from sysfs | ||
3977 | * may have whitespace in the name (trailing newlines, for example). | ||
3978 | */ | ||
3979 | int bond_parse_parm(const char *buf, const struct bond_parm_tbl *tbl) | ||
3980 | { | ||
3981 | int modeint; | ||
3982 | char *p, modestr[BOND_MAX_MODENAME_LEN + 1]; | ||
3983 | |||
3984 | for (p = (char *)buf; *p; p++) | ||
3985 | if (!(isdigit(*p) || isspace(*p))) | ||
3986 | break; | ||
3987 | |||
3988 | if (*p && sscanf(buf, "%20s", modestr) != 0) | ||
3989 | return bond_parm_tbl_lookup_name(modestr, tbl); | ||
3990 | else if (sscanf(buf, "%d", &modeint) != 0) | ||
3991 | return bond_parm_tbl_lookup(modeint, tbl); | ||
3992 | |||
3993 | return -1; | ||
3994 | } | ||
3995 | |||
3996 | static int bond_check_params(struct bond_params *params) | 3950 | static int bond_check_params(struct bond_params *params) |
3997 | { | 3951 | { |
3998 | int arp_validate_value, fail_over_mac_value, primary_reselect_value, i; | 3952 | int arp_validate_value, fail_over_mac_value, primary_reselect_value, i; |
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index 63ee116adfab..1680fd235659 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h | |||
@@ -495,8 +495,6 @@ void bond_sysfs_slave_del(struct slave *slave); | |||
495 | int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev); | 495 | int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev); |
496 | int bond_release(struct net_device *bond_dev, struct net_device *slave_dev); | 496 | int bond_release(struct net_device *bond_dev, struct net_device *slave_dev); |
497 | int bond_xmit_hash(struct bonding *bond, struct sk_buff *skb, int count); | 497 | int bond_xmit_hash(struct bonding *bond, struct sk_buff *skb, int count); |
498 | int bond_parse_parm(const char *mode_arg, const struct bond_parm_tbl *tbl); | ||
499 | int bond_parm_tbl_lookup(int mode, const struct bond_parm_tbl *tbl); | ||
500 | void bond_select_active_slave(struct bonding *bond); | 498 | void bond_select_active_slave(struct bonding *bond); |
501 | void bond_change_active_slave(struct bonding *bond, struct slave *new_active); | 499 | void bond_change_active_slave(struct bonding *bond, struct slave *new_active); |
502 | void bond_create_debugfs(void); | 500 | void bond_create_debugfs(void); |