Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Yonghong Song <yhs@fb.com>
To: Xu Wang <vulab@iscas.ac.cn>, <ast@kernel.org>,
	<daniel@iogearbox.net>, <kafai@fb.com>, <songliubraving@fb.com>,
	<andriin@fb.com>, <john.fastabend@gmail.com>,
	<kpsingh@chromium.org>, <netdev@vger.kernel.org>,
	<bpf@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] libbpf: simplify the return expression of build_map_pin_path()
Date: Tue, 18 Aug 2020 08:51:32 -0700	[thread overview]
Message-ID: <324a9171-f9e2-2ecf-c01f-a53209d7785a@fb.com> (raw)
In-Reply-To: <20200818082008.12143-1-vulab@iscas.ac.cn>



On 8/18/20 1:20 AM, Xu Wang wrote:
> Simplify the return expression.
> 
> Signed-off-by: Xu Wang <vulab@iscas.ac.cn>

Also, please tag your patch targeting to 'bpf-next' tree like
[PATCH bpf-next] so people knows which tree the patch targets.

> ---
>   tools/lib/bpf/libbpf.c | 6 +-----
>   1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
> index 5055e1531e43..b423fdaae0b6 100644
> --- a/tools/lib/bpf/libbpf.c
> +++ b/tools/lib/bpf/libbpf.c
> @@ -1935,11 +1935,7 @@ static int build_map_pin_path(struct bpf_map *map, const char *path)
>   	else if (len >= PATH_MAX)
>   		return -ENAMETOOLONG;
>   
> -	err = bpf_map__set_pin_path(map, buf);
> -	if (err)
> -		return err;
> -
> -	return 0;
> +	return bpf_map__set_pin_path(map, buf);
>   }
>   
>   
> 

      parent reply	other threads:[~2020-08-18 15:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-18  8:20 Xu Wang
2020-08-18 15:50 ` Yonghong Song
2020-08-18 15:51 ` Yonghong Song [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=324a9171-f9e2-2ecf-c01f-a53209d7785a@fb.com \
    --to=yhs@fb.com \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=vulab@iscas.ac.cn \
    --subject='Re: [PATCH] libbpf: simplify the return expression of build_map_pin_path()' \
    /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

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).