Netdev List
 help / color / mirror / Atom feed
From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
To: Arnd Bergmann <arnd@arndb.de>, "David S. Miller" <davem@davemloft.net>
Cc: Jiri Pirko <jiri@mellanox.com>, Yotam Gigi <yotamg@mellanox.com>,
	Roopa Prabhu <roopa@cumulusnetworks.com>,
	Petr Machata <petrm@mellanox.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: bridge: fix br_vlan_get_{pvid,info} return values
Date: Fri, 6 Jul 2018 15:51:28 +0300	[thread overview]
Message-ID: <49b31434-53e5-72e9-ae0b-1c1200806a50@cumulusnetworks.com> (raw)
In-Reply-To: <20180706124420.3129099-1-arnd@arndb.de>

On 06/07/18 15:44, Arnd Bergmann wrote:
> These two functions return the regular -EINVAL failure in the normal
> code path, but return a nonstandard '-1' error otherwise, which gets
> interpreted as -EPERM.
> 
> Let's change it to -EINVAL for the dummy functions as well.
> 
> Fixes: 4d4fd36126d6 ("net: bridge: Publish bridge accessor functions")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  include/linux/if_bridge.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h
> index 7843b98e1c6e..c20c7e197d07 100644
> --- a/include/linux/if_bridge.h
> +++ b/include/linux/if_bridge.h
> @@ -105,13 +105,13 @@ static inline bool br_vlan_enabled(const struct net_device *dev)
>  
>  static inline int br_vlan_get_pvid(const struct net_device *dev, u16 *p_pvid)
>  {
> -	return -1;
> +	return -EINVAL;
>  }
>  
>  static inline int br_vlan_get_info(const struct net_device *dev, u16 vid,
>  				   struct bridge_vlan_info *p_vinfo)
>  {
> -	return -1;
> +	return -EINVAL;
>  }
>  #endif
>  
> 

Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>

  reply	other threads:[~2018-07-06 12:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-06 12:44 [PATCH net] net: bridge: fix br_vlan_get_{pvid,info} return values Arnd Bergmann
2018-07-06 12:51 ` Nikolay Aleksandrov [this message]
2018-07-07 11:05 ` David Miller

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=49b31434-53e5-72e9-ae0b-1c1200806a50@cumulusnetworks.com \
    --to=nikolay@cumulusnetworks.com \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=jiri@mellanox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=petrm@mellanox.com \
    --cc=roopa@cumulusnetworks.com \
    --cc=yotamg@mellanox.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