From: YueHaibing <yuehaibing@huawei.com> To: <bjorn.topel@intel.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: YueHaibing <yuehaibing@huawei.com>, <netdev@vger.kernel.org>, <bpf@vger.kernel.org>, <kernel-janitors@vger.kernel.org> Subject: [PATCH -next] bpf: Use PTR_ERR_OR_ZERO in xsk_map_inc() Date: Tue, 20 Aug 2019 01:36:52 +0000 [thread overview] Message-ID: <20190820013652.147041-1-yuehaibing@huawei.com> (raw) 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)
WARNING: multiple messages have this Message-ID (diff)
From: YueHaibing <yuehaibing@huawei.com> To: bjorn.topel@intel.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: YueHaibing <yuehaibing@huawei.com>, netdev@vger.kernel.org, bpf@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH -next] bpf: Use PTR_ERR_OR_ZERO in xsk_map_inc() Date: Tue, 20 Aug 2019 01:36:52 +0000 [thread overview] Message-ID: <20190820013652.147041-1-yuehaibing@huawei.com> (raw) 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)
next reply other threads:[~2019-08-20 1:33 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-08-20 1:36 YueHaibing [this message] 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 2019-08-20 7:28 ` Björn Töpel 2019-08-20 8:55 ` Dan Carpenter 2019-08-20 8:55 ` Dan Carpenter 2019-08-20 9:25 ` Björn Töpel 2019-08-20 9:25 ` Björn Töpel 2019-08-20 9:44 ` Dan Carpenter 2019-08-20 9:44 ` Dan Carpenter 2019-08-20 11:46 ` Yuehaibing 2019-08-20 11:46 ` Yuehaibing 2019-08-20 15:09 ` Daniel Borkmann 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=20190820013652.147041-1-yuehaibing@huawei.com \ --to=yuehaibing@huawei.com \ --cc=ast@kernel.org \ --cc=bjorn.topel@intel.com \ --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 \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.