mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: williamsukatube@163.com, dsahern@kernel.org, davem@davemloft.net,
	yoshfuji@linux-ipv6.org, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] nexthop: simplify code in nh_valid_get_bucket_req
Date: Sat, 17 Sep 2022 18:07:20 +0200	[thread overview]
Message-ID: <70a79b03-c691-3376-e88c-fd742d3e41d7@wanadoo.fr> (raw)
In-Reply-To: <20220917063031.2172-1-williamsukatube@163.com>

Le 17/09/2022 à 08:30, williamsukatube@163.com a écrit :
> From: William Dean <williamsukatube@163.com>
> 
> It could directly return 'nh_valid_get_bucket_req_res_bucket' to simplify code.
> 
> Signed-off-by: William Dean <williamsukatube@163.com>
> ---
>   net/ipv4/nexthop.c | 6 +-----
>   1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c
> index 853a75a8fbaf..1556961cf153 100644
> --- a/net/ipv4/nexthop.c
> +++ b/net/ipv4/nexthop.c
> @@ -3489,12 +3489,8 @@ static int nh_valid_get_bucket_req(const struct nlmsghdr *nlh,
>   		return -EINVAL;
>   	}
> 
> -	err = nh_valid_get_bucket_req_res_bucket(tb[NHA_RES_BUCKET],
> +	return nh_valid_get_bucket_req_res_bucket(tb[NHA_RES_BUCKET],
>   						 bucket_index, extack);

Nit: there should be 1 additional space to keep alignment.

CJ

> -	if (err)
> -		return err;
> -
> -	return 0;
>   }
> 
>   /* rtnl */



      parent reply	other threads:[~2022-09-17 16:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-17  6:30 williamsukatube
2022-09-17 14:45 ` David Ahern
2022-09-17 16:07 ` Christophe JAILLET [this message]

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=70a79b03-c691-3376-e88c-fd742d3e41d7@wanadoo.fr \
    --to=christophe.jaillet@wanadoo.fr \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=williamsukatube@163.com \
    --cc=yoshfuji@linux-ipv6.org \
    /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

all inboxes | Powered by JetHome®