From: Leon Romanovsky <leon@kernel.org>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Zhen Lei <thunder.leizhen@huawei.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
Yonghong Song <yhs@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>, netdev <netdev@vger.kernel.org>,
bpf <bpf@vger.kernel.org>
Subject: Re: [PATCH 1/1] libbpf: Delete an unneeded bool conversion
Date: Tue, 11 May 2021 08:09:11 +0300 [thread overview]
Message-ID: <YJoRd4reWa1viW76@unreal> (raw)
In-Reply-To: <CAEf4BzaADXguVoh0KXxGYhzG68eA1bqfKH1T1SWyPvkE5BHa5g@mail.gmail.com>
On Mon, May 10, 2021 at 11:00:29AM -0700, Andrii Nakryiko wrote:
> On Mon, May 10, 2021 at 5:43 AM Zhen Lei <thunder.leizhen@huawei.com> wrote:
> >
> > The result of an expression consisting of a single relational operator is
> > already of the bool type and does not need to be evaluated explicitly.
> >
> > No functional change.
> >
> > Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> > ---
>
> See [0] and [1].
>
> [0] https://lore.kernel.org/bpf/CAEf4BzYgLf5g3oztbA-CJR4gQ7AVKQAGrsHWCOgTtUMUM-Mxfg@mail.gmail.com/
> [1] https://lore.kernel.org/bpf/CAEf4BzZQ6=-h3g1duXFwDLr92z7nE6ajv8Rz_Zv=qx=-F3sRVA@mail.gmail.com/
How long do you plan to fight with such patches?
Thanks
>
> > tools/lib/bpf/libbpf.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
> > index e2a3cf4378140f2..fa02213c451f4d2 100644
> > --- a/tools/lib/bpf/libbpf.c
> > +++ b/tools/lib/bpf/libbpf.c
> > @@ -1504,7 +1504,7 @@ static int set_kcfg_value_tri(struct extern_desc *ext, void *ext_val,
> > ext->name, value);
> > return -EINVAL;
> > }
> > - *(bool *)ext_val = value == 'y' ? true : false;
> > + *(bool *)ext_val = value == 'y';
> > break;
> > case KCFG_TRISTATE:
> > if (value == 'y')
> > --
> > 2.26.0.106.g9fadedd
> >
> >
next prev parent reply other threads:[~2021-05-11 5:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-10 12:43 [PATCH 1/1] libbpf: Delete an unneeded bool conversion Zhen Lei
2021-05-10 18:00 ` Andrii Nakryiko
2021-05-11 5:09 ` Leon Romanovsky [this message]
2021-05-12 19:02 ` Andrii Nakryiko
2021-05-13 2:14 ` Leizhen (ThunderTown)
2021-05-13 6:22 ` Leon Romanovsky
2021-05-13 6:31 ` Leon Romanovsky
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=YJoRd4reWa1viW76@unreal \
--to=leon@kernel.org \
--cc=andrii.nakryiko@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@fb.com \
--cc=thunder.leizhen@huawei.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: 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.