# \[PATCH net\] net: dsa: fix spurious error message when unoffloaded port leaves bridge

- Subsystems: NETWORKING \[GENERAL\], NETWORKING \[DSA\], THE REST
- Maintainers: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Willem de Bruijn, Andrew Lunn, Vladimir Oltean, Linus Torvalds
- Status: LANDED (43a4b4dbd48c · 2021-10-12 23:11)
- Landed in mainline as 43a4b4dbd48c on 2021-10-12.
- List: netdev
- 4 messages, 4 authors
- Page: https://ratatoskr.run/netdev/2021/10/1538928/t

## \[PATCH net\] net: dsa: fix spurious error message when unoffloaded port leaves bridge

- From: Alvin Šipraga \<hidden\>
- Date: 2021-10-12 11:28:23 
- Message: https://ratatoskr.run/netdev/2021/10/1538928.md

```text
From: Alvin Šipraga <redacted>

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 <redacted>
---
 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

```

## Re: \[PATCH net\] net: dsa: fix spurious error message when unoffloaded port leaves bridge

- From: Vladimir Oltean \<olteanv@gmail.com\>
- Date: 2021-10-12 11:36:36 
- Message: https://ratatoskr.run/netdev/2021/10/1538936.md

```text
On Tue, Oct 12, 2021 at 01:27:31PM +0200, Alvin Šipraga wrote:
> From: Alvin Šipraga <redacted>
> 
> 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 <redacted>
> ---
>  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>
```

## Re: \[PATCH net\] net: dsa: fix spurious error message when unoffloaded port leaves bridge

- From: Florian Fainelli \<f.fainelli@gmail.com\>
- Date: 2021-10-12 16:21:05 
- Message: https://ratatoskr.run/netdev/2021/10/1539240.md

```text
On 10/12/21 4:27 AM, Alvin Šipraga wrote:
> From: Alvin Šipraga <redacted>
> 
> 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 <redacted>

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

## Re: \[PATCH net\] net: dsa: fix spurious error message when unoffloaded port leaves bridge

- From: patchwork-bot+netdevbpf@kernel.org
- Date: 2021-10-12 23:30:10 
- Message: https://ratatoskr.run/netdev/2021/10/1539575.md

```text
Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski [ref]:

On Tue, 12 Oct 2021 13:27:31 +0200 you wrote:
> From: Alvin Šipraga <redacted>
> 
> 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


```
