Re: [PATCH bpf-next] selftests/bpf: Return true/false (not 1/0) from bool functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 13, 2022 at 8:37 PM Stanislav Fomichev <sdf@xxxxxxxxxx> wrote:
>
> On Wed, Jul 13, 2022 at 6:57 PM xiaolinkui <xiaolinkui@xxxxxxxxx> wrote:
> >
> > From: Linkui Xiao <xiaolinkui@xxxxxxxxxx>
> >
> > Return boolean values ("true" or "false") instead of 1 or 0 from bool
> > functions.  This fixes the following warnings from coccicheck:
> >
> > tools/testing/selftests/bpf/progs/test_xdp_noinline.c:407:9-10: WARNING:
> > return of 0/1 in function 'decap_v4' with return type bool
> > tools/testing/selftests/bpf/progs/test_xdp_noinline.c:389:9-10: WARNING:
> > return of 0/1 in function 'decap_v6' with return type bool
> > tools/testing/selftests/bpf/progs/test_xdp_noinline.c:290:9-10: WARNING:
> > return of 0/1 in function 'encap_v6' with return type bool
> > tools/testing/selftests/bpf/progs/test_xdp_noinline.c:264:9-10: WARNING:
> > return of 0/1 in function 'parse_tcp' with return type bool
> > tools/testing/selftests/bpf/progs/test_xdp_noinline.c:242:9-10: WARNING:
> > return of 0/1 in function 'parse_udp' with return type bool
> >
> > Generated by: scripts/coccinelle/misc/boolreturn.cocci
> >
> > Signed-off-by: Linkui Xiao <xiaolinkui@xxxxxxxxxx>
> Reviewed-by: Stanislav Fomichev <sdf@xxxxxxxxxx>
>
> > Suggested-by: Stanislav Fomichev <sdf@xxxxxxxxxx>
> That shouldn't be here :-) I didn't suggest the patch, you're
> suggesting it, I'm just suggesting to properly format it.
> Probably not worth a respin, I hope whoever gets to apply it can drop
> that line (or maybe keep it, I don't mind).

Dropped Suggested-by, applied to bpf-next.

>
> > ---
> >  .../selftests/bpf/progs/test_xdp_noinline.c   | 30 +++++++++----------
> >  1 file changed, 15 insertions(+), 15 deletions(-)
> >

[...]



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux