public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: "Alvin Šipraga" <alvin@pqrs.dk>
Cc: "Andrew Lunn" <andrew@lunn.ch>,
	"Vivien Didelot" <vivien.didelot@gmail.com>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Alvin Šipraga" <alsi@bang-olufsen.dk>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: dsa: fix spurious error message when unoffloaded port leaves bridge
Date: Tue, 12 Oct 2021 14:36:30 +0300	[thread overview]
Message-ID: <20211012113630.f4memvtchrgxswti@skbuf> (raw)
In-Reply-To: <20211012112730.3429157-1-alvin@pqrs.dk>

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>

  reply	other threads:[~2021-10-12 11:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2021-10-12 16:20 ` Florian Fainelli
2021-10-12 23:30 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211012113630.f4memvtchrgxswti@skbuf \
    --to=olteanv@gmail.com \
    --cc=alsi@bang-olufsen.dk \
    --cc=alvin@pqrs.dk \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox