* [PATCH next] bonding: simple code refactor
@ 2015-02-19 18:13 Mahesh Bandewar
2015-02-19 18:39 ` Andy Gospodarek
2015-02-20 22:43 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Mahesh Bandewar @ 2015-02-19 18:13 UTC (permalink / raw)
To: Jay Vosburgh, Andy Gospodarek, Veaceslav Falico,
Nikolay Aleksandrov, David Miller
Cc: Mahesh Bandewar, Maciej Zenczykowski, netdev, Eric Dumazet
Remove duplicate code.
Signed-off-by: Mahesh Bandewar <maheshb@google.com>
---
drivers/net/bonding/bond_main.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 19b12fbd808d..cbf77d388f53 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2933,6 +2933,8 @@ static int bond_slave_netdev_event(unsigned long event,
if (old_duplex != slave->duplex)
bond_3ad_adapter_duplex_changed(slave);
}
+ /* Fallthrough */
+ case NETDEV_DOWN:
/* Refresh slave-array if applicable!
* If the setup does not use miimon or arpmon (mode-specific!),
* then these events will not cause the slave-array to be
@@ -2944,10 +2946,6 @@ static int bond_slave_netdev_event(unsigned long event,
if (bond_mode_uses_xmit_hash(bond))
bond_update_slave_arr(bond, NULL);
break;
- case NETDEV_DOWN:
- if (bond_mode_uses_xmit_hash(bond))
- bond_update_slave_arr(bond, NULL);
- break;
case NETDEV_CHANGEMTU:
/* TODO: Should slaves be allowed to
* independently alter their MTU? For
--
2.2.0.rc0.207.ga3a616c
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH next] bonding: simple code refactor
2015-02-19 18:13 [PATCH next] bonding: simple code refactor Mahesh Bandewar
@ 2015-02-19 18:39 ` Andy Gospodarek
2015-02-20 22:43 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Andy Gospodarek @ 2015-02-19 18:39 UTC (permalink / raw)
To: Mahesh Bandewar
Cc: Jay Vosburgh, Andy Gospodarek, Veaceslav Falico,
Nikolay Aleksandrov, David Miller, Maciej Zenczykowski, netdev,
Eric Dumazet
On Thu, Feb 19, 2015 at 10:13:25AM -0800, Mahesh Bandewar wrote:
> Remove duplicate code.
>
> Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Looks good.
Signed-off-by: Andy Gospodarek <gospo@cumulusnetworks.com>
> ---
> drivers/net/bonding/bond_main.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> index 19b12fbd808d..cbf77d388f53 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -2933,6 +2933,8 @@ static int bond_slave_netdev_event(unsigned long event,
> if (old_duplex != slave->duplex)
> bond_3ad_adapter_duplex_changed(slave);
> }
> + /* Fallthrough */
> + case NETDEV_DOWN:
> /* Refresh slave-array if applicable!
> * If the setup does not use miimon or arpmon (mode-specific!),
> * then these events will not cause the slave-array to be
> @@ -2944,10 +2946,6 @@ static int bond_slave_netdev_event(unsigned long event,
> if (bond_mode_uses_xmit_hash(bond))
> bond_update_slave_arr(bond, NULL);
> break;
> - case NETDEV_DOWN:
> - if (bond_mode_uses_xmit_hash(bond))
> - bond_update_slave_arr(bond, NULL);
> - break;
> case NETDEV_CHANGEMTU:
> /* TODO: Should slaves be allowed to
> * independently alter their MTU? For
> --
> 2.2.0.rc0.207.ga3a616c
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH next] bonding: simple code refactor
2015-02-19 18:13 [PATCH next] bonding: simple code refactor Mahesh Bandewar
2015-02-19 18:39 ` Andy Gospodarek
@ 2015-02-20 22:43 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2015-02-20 22:43 UTC (permalink / raw)
To: maheshb; +Cc: j.vosburgh, andy, vfalico, nikolay, maze, netdev, edumazet
From: Mahesh Bandewar <maheshb@google.com>
Date: Thu, 19 Feb 2015 10:13:25 -0800
> Remove duplicate code.
>
> Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-20 22:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-19 18:13 [PATCH next] bonding: simple code refactor Mahesh Bandewar
2015-02-19 18:39 ` Andy Gospodarek
2015-02-20 22:43 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox