Re: [PATCH bpf-next v7 0/5] bpf: Add open-coded style process file iterator and bpf_fget_task() kfunc

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

 



On 2025/1/21 15:20, Juntong Deng wrote:
I noticed that the errors in Kernel CI

progs/iters_task_file.c: In function ‘test_bpf_iter_task_file’:
  progs/iters_task_file.c:43:33: error: taking address of expression of type ‘void’ [-Werror]
      43 |         if (item->file->f_op != &pipefifo_fops) {
         |                                 ^
  progs/iters_task_file.c:59:33: error: taking address of expression of type ‘void’ [-Werror]
      59 |         if (item->file->f_op != &pipefifo_fops) {
         |                                 ^
  progs/iters_task_file.c:75:33: error: taking address of expression of type ‘void’ [-Werror]
      75 |         if (item->file->f_op != &socket_file_ops) {
         |                                 ^

These errors are caused by -Werror (treat all warnings as errors).

In this test case, we do need to get the address of void type.

I found out that these errors were caused by removing the 'const'
in front of 'void'.

I will add back 'const' in the next version.




[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