* [PATCH net-next] net: dsa: remove dsa_port_is_bridged
@ 2017-05-26 22:12 Vivien Didelot
2017-05-27 0:15 ` Florian Fainelli
2017-05-30 3:32 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Vivien Didelot @ 2017-05-26 22:12 UTC (permalink / raw)
To: netdev
Cc: linux-kernel, kernel, David S. Miller, Florian Fainelli,
Andrew Lunn, Vivien Didelot
The helper is only used once and makes the code more complicated that it
should. Remove it and reorganize the variables so that it fits on 80
columns.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
net/dsa/slave.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 887e26695519..0442b6bf52fa 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -69,18 +69,13 @@ static int dsa_slave_get_iflink(const struct net_device *dev)
return p->dp->ds->dst->master_netdev->ifindex;
}
-static inline bool dsa_port_is_bridged(struct dsa_port *dp)
-{
- return !!dp->bridge_dev;
-}
-
static int dsa_slave_open(struct net_device *dev)
{
struct dsa_slave_priv *p = netdev_priv(dev);
- struct net_device *master = p->dp->ds->dst->master_netdev;
- struct dsa_switch *ds = p->dp->ds;
- u8 stp_state = dsa_port_is_bridged(p->dp) ?
- BR_STATE_BLOCKING : BR_STATE_FORWARDING;
+ struct dsa_port *dp = p->dp;
+ struct dsa_switch *ds = dp->ds;
+ struct net_device *master = ds->dst->master_netdev;
+ u8 stp_state = dp->bridge_dev ? BR_STATE_BLOCKING : BR_STATE_FORWARDING;
int err;
if (!(master->flags & IFF_UP))
--
2.13.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: dsa: remove dsa_port_is_bridged
2017-05-26 22:12 [PATCH net-next] net: dsa: remove dsa_port_is_bridged Vivien Didelot
@ 2017-05-27 0:15 ` Florian Fainelli
2017-05-30 3:32 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2017-05-27 0:15 UTC (permalink / raw)
To: Vivien Didelot, netdev; +Cc: linux-kernel, kernel, David S. Miller, Andrew Lunn
On 05/26/2017 03:12 PM, Vivien Didelot wrote:
> The helper is only used once and makes the code more complicated that it
> should. Remove it and reorganize the variables so that it fits on 80
> columns.
>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: dsa: remove dsa_port_is_bridged
2017-05-26 22:12 [PATCH net-next] net: dsa: remove dsa_port_is_bridged Vivien Didelot
2017-05-27 0:15 ` Florian Fainelli
@ 2017-05-30 3:32 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-05-30 3:32 UTC (permalink / raw)
To: vivien.didelot; +Cc: netdev, linux-kernel, kernel, f.fainelli, andrew
From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Date: Fri, 26 May 2017 18:12:42 -0400
> The helper is only used once and makes the code more complicated that it
> should. Remove it and reorganize the variables so that it fits on 80
> columns.
>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-05-30 3:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-26 22:12 [PATCH net-next] net: dsa: remove dsa_port_is_bridged Vivien Didelot
2017-05-27 0:15 ` Florian Fainelli
2017-05-30 3:32 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).