From: John Fastabend <john.fastabend@gmail.com>
To: guanjing <guanjing@cmss.chinamobile.com>,
andrii@kernel.org, eddyz87@gmail.com, mykolal@fb.com,
ast@kernel.org, daniel@iogearbox.net, martin.lau@linux.dev,
song@kernel.org, yonghong.song@linux.dev,
john.fastabend@gmail.com, kpsingh@kernel.org, sdf@fomichev.me,
haoluo@google.com, jolsa@kernel.org, shuah@kernel.org
Cc: bpf@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org,
guanjing <guanjing@cmss.chinamobile.com>
Subject: RE: [PATCH v1] selftests/bpf: Fix unnecessary conversion to bool in 'run_subtest'
Date: Wed, 20 Nov 2024 22:38:24 -0800 [thread overview]
Message-ID: <673ed56061103_157a208bc@john.notmuch> (raw)
In-Reply-To: <20241117102857.198803-1-guanjing@cmss.chinamobile.com>
guanjing wrote:
> Fixes the following coccicheck:
>
> tools/testing/selftests/bpf/test_loader.c:1033:64-69: WARNING: conversion to bool not needed here
>
> Fixes: 80a4129fcf20 ("selftests/bpf: Add unit tests for bpf_arena_alloc/free_pages")
> Signed-off-by: guanjing <guanjing@cmss.chinamobile.com>
> ---
I'll argue this is bpf-next and no need for a fixes tag here.
> tools/testing/selftests/bpf/test_loader.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/bpf/test_loader.c b/tools/testing/selftests/bpf/test_loader.c
> index 3e9b009580d4..400f56f81272 100644
> --- a/tools/testing/selftests/bpf/test_loader.c
> +++ b/tools/testing/selftests/bpf/test_loader.c
> @@ -1030,7 +1030,7 @@ void run_subtest(struct test_loader *tester,
> }
>
> do_prog_test_run(bpf_program__fd(tprog), &retval,
> - bpf_program__type(tprog) == BPF_PROG_TYPE_SYSCALL ? true : false);
> + bpf_program__type(tprog) == BPF_PROG_TYPE_SYSCALL);
> if (retval != subspec->retval && subspec->retval != POINTER_VALUE) {
> PRINT_FAIL("Unexpected retval: %d != %d\n", retval, subspec->retval);
> goto tobj_cleanup;
> --
> 2.33.0
>
>
>
next prev parent reply other threads:[~2024-11-21 6:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-17 10:28 [PATCH v1] selftests/bpf: Fix unnecessary conversion to bool in 'run_subtest' guanjing
2024-11-21 6:38 ` John Fastabend [this message]
2024-11-25 22:34 ` Alexei Starovoitov
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=673ed56061103_157a208bc@john.notmuch \
--to=john.fastabend@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=guanjing@cmss.chinamobile.com \
--cc=haoluo@google.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=mykolal@fb.com \
--cc=sdf@fomichev.me \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/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 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.