All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net: dsa: fix spurious error message when unoffloaded port leaves bridge
@ 2021-10-12 11:27 Alvin Šipraga
  2021-10-12 11:36 ` Vladimir Oltean
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alvin Šipraga @ 2021-10-12 11:27 UTC (permalink / raw)
  To: Andrew Lunn, Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S. Miller, Jakub Kicinski
  Cc: Alvin Šipraga, netdev, linux-kernel

From: Alvin Šipraga <alsi@bang-olufsen.dk>

Flip the sign of a return value check, thereby suppressing the following
spurious error:

  port 2 failed to notify DSA_NOTIFIER_BRIDGE_LEAVE: -EOPNOTSUPP

... which is emitted when removing an unoffloaded DSA switch port from a
bridge.

Fixes: d371b7c92d19 ("net: dsa: Unset vlan_filtering when ports leave the bridge")
Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
---
 net/dsa/switch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/dsa/switch.c b/net/dsa/switch.c
index 1c797ec8e2c2..6466d0539af9 100644
--- a/net/dsa/switch.c
+++ b/net/dsa/switch.c
@@ -168,7 +168,7 @@ static int dsa_switch_bridge_leave(struct dsa_switch *ds,
 		if (extack._msg)
 			dev_err(ds->dev, "port %d: %s\n", info->port,
 				extack._msg);
-		if (err && err != EOPNOTSUPP)
+		if (err && err != -EOPNOTSUPP)
 			return err;
 	}
 
-- 
2.32.0


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

* Re: [PATCH net] net: dsa: fix spurious error message when unoffloaded port leaves bridge
  2021-10-12 11:27 [PATCH net] net: dsa: fix spurious error message when unoffloaded port leaves bridge Alvin Šipraga
@ 2021-10-12 11:36 ` Vladimir Oltean
  2021-10-12 16:20 ` Florian Fainelli
  2021-10-12 23:30 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Vladimir Oltean @ 2021-10-12 11:36 UTC (permalink / raw)
  To: Alvin Šipraga
  Cc: Andrew Lunn, Vivien Didelot, Florian Fainelli, David S. Miller,
	Jakub Kicinski, Alvin Šipraga, netdev, linux-kernel

On Tue, Oct 12, 2021 at 01:27:31PM +0200, Alvin Šipraga wrote:
> From: Alvin Šipraga <alsi@bang-olufsen.dk>
> 
> Flip the sign of a return value check, thereby suppressing the following
> spurious error:
> 
>   port 2 failed to notify DSA_NOTIFIER_BRIDGE_LEAVE: -EOPNOTSUPP
> 
> ... which is emitted when removing an unoffloaded DSA switch port from a
> bridge.
> 
> Fixes: d371b7c92d19 ("net: dsa: Unset vlan_filtering when ports leave the bridge")
> Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
> ---
>  net/dsa/switch.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/dsa/switch.c b/net/dsa/switch.c
> index 1c797ec8e2c2..6466d0539af9 100644
> --- a/net/dsa/switch.c
> +++ b/net/dsa/switch.c
> @@ -168,7 +168,7 @@ static int dsa_switch_bridge_leave(struct dsa_switch *ds,
>  		if (extack._msg)
>  			dev_err(ds->dev, "port %d: %s\n", info->port,
>  				extack._msg);
> -		if (err && err != EOPNOTSUPP)
> +		if (err && err != -EOPNOTSUPP)
>  			return err;
>  	}
>  
> -- 
> 2.32.0
> 

Ouch, good catch.

Reviewed-by: Vladimir Oltean <olteanv@gmail.com>

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

* Re: [PATCH net] net: dsa: fix spurious error message when unoffloaded port leaves bridge
  2021-10-12 11:27 [PATCH net] net: dsa: fix spurious error message when unoffloaded port leaves bridge Alvin Šipraga
  2021-10-12 11:36 ` Vladimir Oltean
@ 2021-10-12 16:20 ` Florian Fainelli
  2021-10-12 23:30 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2021-10-12 16:20 UTC (permalink / raw)
  To: Alvin Šipraga, Andrew Lunn, Vivien Didelot, Vladimir Oltean,
	David S. Miller, Jakub Kicinski
  Cc: Alvin Šipraga, netdev, linux-kernel

On 10/12/21 4:27 AM, Alvin Šipraga wrote:
> From: Alvin Šipraga <alsi@bang-olufsen.dk>
> 
> Flip the sign of a return value check, thereby suppressing the following
> spurious error:
> 
>   port 2 failed to notify DSA_NOTIFIER_BRIDGE_LEAVE: -EOPNOTSUPP
> 
> ... which is emitted when removing an unoffloaded DSA switch port from a
> bridge.
> 
> Fixes: d371b7c92d19 ("net: dsa: Unset vlan_filtering when ports leave the bridge")
> Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

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

* Re: [PATCH net] net: dsa: fix spurious error message when unoffloaded port leaves bridge
  2021-10-12 11:27 [PATCH net] net: dsa: fix spurious error message when unoffloaded port leaves bridge Alvin Šipraga
  2021-10-12 11:36 ` Vladimir Oltean
  2021-10-12 16:20 ` Florian Fainelli
@ 2021-10-12 23:30 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-10-12 23:30 UTC (permalink / raw)
  To: =?utf-8?b?QWx2aW4gxaBpcHJhZ2EgPGFsdmluQHBxcnMuZGs+?=
  Cc: andrew, vivien.didelot, f.fainelli, olteanv, davem, kuba, alsi,
	netdev, linux-kernel

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 12 Oct 2021 13:27:31 +0200 you wrote:
> From: Alvin Šipraga <alsi@bang-olufsen.dk>
> 
> Flip the sign of a return value check, thereby suppressing the following
> spurious error:
> 
>   port 2 failed to notify DSA_NOTIFIER_BRIDGE_LEAVE: -EOPNOTSUPP
> 
> [...]

Here is the summary with links:
  - [net] net: dsa: fix spurious error message when unoffloaded port leaves bridge
    https://git.kernel.org/netdev/net/c/43a4b4dbd48c

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2021-10-12 23:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-12 11:27 [PATCH net] net: dsa: fix spurious error message when unoffloaded port leaves bridge Alvin Šipraga
2021-10-12 11:36 ` Vladimir Oltean
2021-10-12 16:20 ` Florian Fainelli
2021-10-12 23:30 ` patchwork-bot+netdevbpf

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.