All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net: dsa: Fix dsa_is_user_port() test inversion
@ 2018-03-12 23:00 Florian Fainelli
  2018-03-13  1:06 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2018-03-12 23:00 UTC (permalink / raw)
  To: netdev
  Cc: yxj790222, Florian Fainelli, Andrew Lunn, Vivien Didelot,
	David S. Miller, open list

During the conversion to dsa_is_user_port(), a condition ended up being
reversed, which would prevent the creation of any user port when using
the legacy binding and/or platform data, fix that.

Fixes: 4a5b85ffe2a0 ("net: dsa: use dsa_is_user_port everywhere")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 net/dsa/legacy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/dsa/legacy.c b/net/dsa/legacy.c
index cb54b81d0bd9..42a7b85b84e1 100644
--- a/net/dsa/legacy.c
+++ b/net/dsa/legacy.c
@@ -194,7 +194,7 @@ static int dsa_switch_setup_one(struct dsa_switch *ds,
 		ds->ports[i].dn = cd->port_dn[i];
 		ds->ports[i].cpu_dp = dst->cpu_dp;
 
-		if (dsa_is_user_port(ds, i))
+		if (!dsa_is_user_port(ds, i))
 			continue;
 
 		ret = dsa_slave_create(&ds->ports[i]);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] net: dsa: Fix dsa_is_user_port() test inversion
  2018-03-12 23:00 [PATCH net] net: dsa: Fix dsa_is_user_port() test inversion Florian Fainelli
@ 2018-03-13  1:06 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-03-13  1:06 UTC (permalink / raw)
  To: f.fainelli; +Cc: netdev, yxj790222, andrew, vivien.didelot, linux-kernel

From: Florian Fainelli <f.fainelli@gmail.com>
Date: Mon, 12 Mar 2018 16:00:40 -0700

> During the conversion to dsa_is_user_port(), a condition ended up being
> reversed, which would prevent the creation of any user port when using
> the legacy binding and/or platform data, fix that.
> 
> Fixes: 4a5b85ffe2a0 ("net: dsa: use dsa_is_user_port everywhere")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Applied and queued up for -stable, thanks Florian.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-13  1:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-12 23:00 [PATCH net] net: dsa: Fix dsa_is_user_port() test inversion Florian Fainelli
2018-03-13  1:06 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.