Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [rostedt-trace:pmem-on-reserve-mem-fail 6/10] kernel/trace/trace.c:6027:38: error: incomplete definition of type 'struct module'
@ 2025-02-12  1:19 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-12  1:19 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git pmem-on-reserve-mem-fail
head:   d877ee1b587be39c141df16a6f92efb0e90b30fd
commit: 2619aa2c2e2767ba8b87e26deac031e4f44d49cc [6/10] tracing: Have persistent trace instances save module addresses
config: x86_64-buildonly-randconfig-003-20250212 (https://download.01.org/0day-ci/archive/20250212/202502120954.IwPOQJzd-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250212/202502120954.IwPOQJzd-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502120954.IwPOQJzd-lkp@intel.com/

All errors (new ones prefixed by >>):

>> kernel/trace/trace.c:6027:38: error: incomplete definition of type 'struct module'
    6027 |         entry->mod_addr = (unsigned long)mod->mem[MOD_TEXT].base;
         |                                          ~~~^
   include/linux/printk.h:394:8: note: forward declaration of 'struct module'
     394 | struct module;
         |        ^
>> kernel/trace/trace.c:6027:44: error: use of undeclared identifier 'MOD_TEXT'
    6027 |         entry->mod_addr = (unsigned long)mod->mem[MOD_TEXT].base;
         |                                                   ^
   kernel/trace/trace.c:6028:30: error: incomplete definition of type 'struct module'
    6028 |         strscpy(entry->mod_name, mod->name);
         |                                  ~~~^
   include/linux/string.h:114:55: note: expanded from macro 'strscpy'
     114 |         CONCATENATE(__strscpy, COUNT_ARGS(__VA_ARGS__))(dst, src, __VA_ARGS__)
         |                                                              ^~~
   include/linux/string.h:80:21: note: expanded from macro '__strscpy0'
      80 |         sized_strscpy(dst, src, sizeof(dst) + __must_be_array(dst) +    \
         |                            ^~~
   include/linux/printk.h:394:8: note: forward declaration of 'struct module'
     394 | struct module;
         |        ^
   3 errors generated.


vim +6027 kernel/trace/trace.c

  6007	
  6008	static int save_mod(struct module *mod, void *data)
  6009	{
  6010		struct trace_array *tr = data;
  6011		struct trace_scratch *tscratch;
  6012		struct trace_mod_entry *entry;
  6013		unsigned int size;
  6014	
  6015		tscratch = tr->scratch;
  6016		if (!tscratch)
  6017			return -1;
  6018		size = tr->scratch_size;
  6019	
  6020		if (struct_size(tscratch, entries, tscratch->nr_entries + 1) > size)
  6021			return -1;
  6022	
  6023		entry = &tscratch->entries[tscratch->nr_entries];
  6024	
  6025		tscratch->nr_entries++;
  6026	
> 6027		entry->mod_addr = (unsigned long)mod->mem[MOD_TEXT].base;
  6028		strscpy(entry->mod_name, mod->name);
  6029	
  6030		return 0;
  6031	}
  6032	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-02-12  1:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-12  1:19 [rostedt-trace:pmem-on-reserve-mem-fail 6/10] kernel/trace/trace.c:6027:38: error: incomplete definition of type 'struct module' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox