diff options
author | dingtianhong <dingtianhong@huawei.com> | 2014-05-07 10:10:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-08 23:41:12 -0400 |
commit | bedabf903d9b1a056ba58dac1c89760d5adca2a3 (patch) | |
tree | 8c74f4f273fedae4b5f75563c3c0fb1bde65d53c | |
parent | 31924325f59ba94deb255e8ae314eb103141af40 (diff) |
bonding: simplify the slave_do_arp_validate_only()
The argument slave is not used for slave_do_arp_validate_only(), so no need
to keep it, make the function more simple.
Cc: Jay Vosburgh <j.vosburgh@gmail.com>
Cc: Veaceslav Falico <vfalico@gmail.com>
Cc: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/bonding/bond_main.c | 4 | ||||
-rw-r--r-- | drivers/net/bonding/bonding.h | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 9d08e007d853..a1741cb23100 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -2291,8 +2291,8 @@ int bond_arp_rcv(const struct sk_buff *skb, struct bonding *bond, | |||
2291 | int alen, is_arp = skb->protocol == __cpu_to_be16(ETH_P_ARP); | 2291 | int alen, is_arp = skb->protocol == __cpu_to_be16(ETH_P_ARP); |
2292 | 2292 | ||
2293 | if (!slave_do_arp_validate(bond, slave)) { | 2293 | if (!slave_do_arp_validate(bond, slave)) { |
2294 | if ((slave_do_arp_validate_only(bond, slave) && is_arp) || | 2294 | if ((slave_do_arp_validate_only(bond) && is_arp) || |
2295 | !slave_do_arp_validate_only(bond, slave)) | 2295 | !slave_do_arp_validate_only(bond)) |
2296 | slave->last_rx = jiffies; | 2296 | slave->last_rx = jiffies; |
2297 | return RX_HANDLER_ANOTHER; | 2297 | return RX_HANDLER_ANOTHER; |
2298 | } else if (!is_arp) { | 2298 | } else if (!is_arp) { |
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index 1eab9115517d..1befc256f31c 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h | |||
@@ -396,8 +396,7 @@ static inline int slave_do_arp_validate(struct bonding *bond, | |||
396 | return bond->params.arp_validate & (1 << bond_slave_state(slave)); | 396 | return bond->params.arp_validate & (1 << bond_slave_state(slave)); |
397 | } | 397 | } |
398 | 398 | ||
399 | static inline int slave_do_arp_validate_only(struct bonding *bond, | 399 | static inline int slave_do_arp_validate_only(struct bonding *bond) |
400 | struct slave *slave) | ||
401 | { | 400 | { |
402 | return bond->params.arp_validate & BOND_ARP_FILTER; | 401 | return bond->params.arp_validate & BOND_ARP_FILTER; |
403 | } | 402 | } |