Re: [PATCH bpf-next v3 1/2] selftests/bpf: Annotate bpf_obj_new_impl() with __must_check

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

 



On Wed, Aug 27, 2025 at 2:38 PM Yonghong Song <yonghong.song@xxxxxxxxx> wrote:
>
>
> diff --git a/tools/testing/selftests/bpf/progs/linked_list_fail.c b/tools/testing/selftests/bpf/progs/linked_list_fail.c
> index 6438982b928b..35616b5c9b9e 100644
> --- a/tools/testing/selftests/bpf/progs/linked_list_fail.c
> +++ b/tools/testing/selftests/bpf/progs/linked_list_fail.c
> @@ -227,7 +227,7 @@ SEC("?tc")
>   int obj_new_no_struct(void *ctx)
>   {
>
> -       bpf_obj_new(union { int data; unsigned udata; });
> +       (void)bpf_obj_new(union { int data; unsigned udata; });
>          return 0;
>   }
>
> @@ -252,7 +252,7 @@ int new_null_ret(void *ctx)
>   SEC("?tc")
>   int obj_new_acq(void *ctx)
>   {
> -       bpf_obj_new(struct foo);
> +       (void)bpf_obj_new(struct foo);
>          return 0;
>   }
>
> I think this probably will address your icecc issue.

Ilya,

does above fix it ?

If so we should probably do that and hold on __must_check,
since if we're getting pedantic __alloc_size__ is a better tag
than __must_check, but it will be even harder to get through pahole.





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux