From: "Björn Töpel" <bjorn.topel@intel.com>
To: YueHaibing <yuehaibing@huawei.com>,
magnus.karlsson@intel.com, jonathan.lemon@gmail.com,
ast@kernel.org, daniel@iogearbox.net, kafai@fb.com,
songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH -next] bpf: Use PTR_ERR_OR_ZERO in xsk_map_inc()
Date: Tue, 20 Aug 2019 09:28:26 +0200 [thread overview]
Message-ID: <93fafdab-8fb3-0f2b-8f36-0cf297db3cd9@intel.com> (raw)
In-Reply-To: <20190820013652.147041-1-yuehaibing@huawei.com>
On 2019-08-20 03:36, YueHaibing wrote:
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> kernel/bpf/xskmap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/bpf/xskmap.c b/kernel/bpf/xskmap.c
> index 4cc28e226398..942c662e2eed 100644
> --- a/kernel/bpf/xskmap.c
> +++ b/kernel/bpf/xskmap.c
> @@ -21,7 +21,7 @@ int xsk_map_inc(struct xsk_map *map)
> struct bpf_map *m = &map->map;
>
> m = bpf_map_inc(m, false);
> - return IS_ERR(m) ? PTR_ERR(m) : 0;
> + return PTR_ERR_OR_ZERO(m);
> }
>
> void xsk_map_put(struct xsk_map *map)
>
Acked-by: Björn Töpel <bjorn.topel@intel.com>
Thanks for the patch!
For future patches: Prefix AF_XDP socket work with "xsk:" and use "PATCH
bpf-next" to let the developers know what tree you're aiming for.
Cheers!
Björn
>
>
next prev parent reply other threads:[~2019-08-20 7:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-20 1:36 [PATCH -next] bpf: Use PTR_ERR_OR_ZERO in xsk_map_inc() YueHaibing
2019-08-20 7:28 ` Björn Töpel [this message]
2019-08-20 8:55 ` Dan Carpenter
2019-08-20 9:25 ` Björn Töpel
2019-08-20 9:44 ` Dan Carpenter
2019-08-20 11:46 ` Yuehaibing
2019-08-20 15:09 ` Daniel Borkmann
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=93fafdab-8fb3-0f2b-8f36-0cf297db3cd9@intel.com \
--to=bjorn.topel@intel.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=john.fastabend@gmail.com \
--cc=jonathan.lemon@gmail.com \
--cc=kafai@fb.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=magnus.karlsson@intel.com \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@fb.com \
--cc=yhs@fb.com \
--cc=yuehaibing@huawei.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