Hi Menglong,

kernel test robot noticed the following build errors:

[auto build test ERROR on bpf-next/master]

url:    
https://github.com/intel-lab-lkp/linux/commits/Menglong-Dong/fprobe-use-rhashtable/20250728-121631
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link:    
https://lore.kernel.org/r/20250728041252.441040-2-dongml2%40chinatelecom.cn
patch subject: [PATCH bpf-next 1/4] fprobe: use rhashtable
config: loongarch-allmodconfig 
(https://download.01.org/0day-ci/archive/20250729/[email protected]/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project 
cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20250729/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

   In file included from kernel/trace/fprobe.c:8:
>> include/linux/fprobe.h:29:20: error: field has incomplete type 'struct 
>> rhash_head'
      29 |         struct rhash_head       hlist;
         |                                 ^
   include/linux/fprobe.h:29:9: note: forward declaration of 'struct rhash_head'
      29 |         struct rhash_head       hlist;
         |                ^
>> kernel/trace/fprobe.c:71:17: error: initializer element is not a 
>> compile-time constant
      71 |         .key_offset             = offsetof(struct fprobe_hlist_node, 
addr),
         |                                   
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/stddef.h:16:32: note: expanded from macro 'offsetof'
      16 | #define offsetof(TYPE, MEMBER)  __builtin_offsetof(TYPE, MEMBER)
         |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   2 errors generated.
--
   In file included from kernel/trace/trace_fprobe.c:9:
>> include/linux/fprobe.h:29:20: error: field has incomplete type 'struct 
>> rhash_head'
      29 |         struct rhash_head       hlist;
         |                                 ^
   include/linux/fprobe.h:29:9: note: forward declaration of 'struct rhash_head'
      29 |         struct rhash_head       hlist;
         |                ^
   1 error generated.


vim +29 include/linux/fprobe.h

    11  
    12  struct fprobe;
    13  typedef int (*fprobe_entry_cb)(struct fprobe *fp, unsigned long 
entry_ip,
    14                                 unsigned long ret_ip, struct ftrace_regs 
*regs,
    15                                 void *entry_data);
    16  
    17  typedef void (*fprobe_exit_cb)(struct fprobe *fp, unsigned long 
entry_ip,
    18                                 unsigned long ret_ip, struct ftrace_regs 
*regs,
    19                                 void *entry_data);
    20  
    21  /**
    22   * struct fprobe_hlist_node - address based hash list node for fprobe.
    23   *
    24   * @hlist: The hlist node for address search hash table.
    25   * @addr: One of the probing address of @fp.
    26   * @fp: The fprobe which owns this.
    27   */
    28  struct fprobe_hlist_node {
  > 29          struct rhash_head       hlist;
    30          unsigned long           addr;
    31          struct fprobe           *fp;
    32  };
    33  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Reply via email to