* [PATCH] bpf: fix warning comparing pointer to 0
@ 2021-03-10 7:18 Jiapeng Chong
2021-03-10 22:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2021-03-10 7:18 UTC (permalink / raw)
To: shuah
Cc: ast, daniel, andrii, kafai, songliubraving, yhs, john.fastabend,
kpsingh, linux-kselftest, netdev, bpf, linux-kernel,
Jiapeng Chong
Fix the following coccicheck warning:
./tools/testing/selftests/bpf/progs/fentry_test.c:67:12-13: WARNING
comparing pointer to 0.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
tools/testing/selftests/bpf/progs/fentry_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/progs/fentry_test.c b/tools/testing/selftests/bpf/progs/fentry_test.c
index 5f645fd..52a550d 100644
--- a/tools/testing/selftests/bpf/progs/fentry_test.c
+++ b/tools/testing/selftests/bpf/progs/fentry_test.c
@@ -64,7 +64,7 @@ struct bpf_fentry_test_t {
SEC("fentry/bpf_fentry_test7")
int BPF_PROG(test7, struct bpf_fentry_test_t *arg)
{
- if (arg == 0)
+ if (!arg)
test7_result = 1;
return 0;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bpf: fix warning comparing pointer to 0
2021-03-10 7:18 [PATCH] bpf: fix warning comparing pointer to 0 Jiapeng Chong
@ 2021-03-10 22:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-03-10 22:00 UTC (permalink / raw)
To: Jiapeng Chong
Cc: shuah, ast, daniel, andrii, kafai, songliubraving, yhs,
john.fastabend, kpsingh, linux-kselftest, netdev, bpf,
linux-kernel
Hello:
This patch was applied to bpf/bpf-next.git (refs/heads/master):
On Wed, 10 Mar 2021 15:18:34 +0800 you wrote:
> Fix the following coccicheck warning:
>
> ./tools/testing/selftests/bpf/progs/fentry_test.c:67:12-13: WARNING
> comparing pointer to 0.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
>
> [...]
Here is the summary with links:
- bpf: fix warning comparing pointer to 0
https://git.kernel.org/bpf/bpf-next/c/a9c80b03e586
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-10 22:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 7:18 [PATCH] bpf: fix warning comparing pointer to 0 Jiapeng Chong
2021-03-10 22:00 ` patchwork-bot+netdevbpf
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).