From: kernel test robot <lkp@intel.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [rostedt-trace:pmem-on-reserve-mem-fail 6/10] kernel/trace/trace.c:6027:38: error: incomplete definition of type 'struct module'
Date: Wed, 12 Feb 2025 09:19:34 +0800 [thread overview]
Message-ID: <202502120954.IwPOQJzd-lkp@intel.com> (raw)
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
reply other threads:[~2025-02-12 1:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202502120954.IwPOQJzd-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox