netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Samudrala, Sridhar" <sridhar.samudrala@intel.com>
To: Jiri Pirko <jiri@resnulli.us>, netdev@vger.kernel.org
Cc: davem@davemloft.net, idosch@mellanox.com, eladr@mellanox.com,
	sfeldma@gmail.com, Jiri Pirko <jiri@mellanox.com>
Subject: Re: [patch net] switchdev: fix return value of switchdev_port_fdb_dump in case of error
Date: Thu, 03 Sep 2015 09:59:38 -0700	[thread overview]
Message-ID: <55E87C7A.4020608@intel.com> (raw)
In-Reply-To: <1441281857-613-1-git-send-email-jiri@resnulli.us>

On 9/3/2015 5:04 AM, Jiri Pirko wrote:
> From: Jiri Pirko <jiri@mellanox.com>
>
> switchdev_port_fdb_dump is used as .ndo_fdb_dump. Its return value is
> idx, so we cannot return errval.
>
> Fixes: 45d4122ca7cd ("switchdev: add support for fdb add/del/dump via switchdev_port_obj ops.")
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Sridhar Samudrala <sridhar.samudrala@intel.com>

> ---
>   net/switchdev/switchdev.c | 6 +-----
>   1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
> index 16c1c43..fda38f8 100644
> --- a/net/switchdev/switchdev.c
> +++ b/net/switchdev/switchdev.c
> @@ -853,12 +853,8 @@ int switchdev_port_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb,
>   		.cb = cb,
>   		.idx = idx,
>   	};
> -	int err;
> -
> -	err = switchdev_port_obj_dump(dev, &dump.obj);
> -	if (err)
> -		return err;
>   
> +	switchdev_port_obj_dump(dev, &dump.obj);
>   	return dump.idx;
>   }
>   EXPORT_SYMBOL_GPL(switchdev_port_fdb_dump);

  reply	other threads:[~2015-09-03 16:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-03 12:04 [patch net] switchdev: fix return value of switchdev_port_fdb_dump in case of error Jiri Pirko
2015-09-03 16:59 ` Samudrala, Sridhar [this message]
2015-09-03 17:35 ` Scott Feldman
2015-09-06  5:02 ` 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=55E87C7A.4020608@intel.com \
    --to=sridhar.samudrala@intel.com \
    --cc=davem@davemloft.net \
    --cc=eladr@mellanox.com \
    --cc=idosch@mellanox.com \
    --cc=jiri@mellanox.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=sfeldma@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;
as well as URLs for NNTP newsgroup(s).