* [jimc:dd-drm-next 14/20] lib/dynamic_debug.c:1308:62: error: invalid use of undefined type 'struct module'
@ 2021-10-14 21:02 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-10-14 21:02 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 9564 bytes --]
tree: https://github.com/jimc/linux.git dd-drm-next
head: 2eec9300d730ad634b967a853579f0b5dffecc01
commit: 8819a72010473e6a18e27cb4a464fb921b1afbc0 [14/20] dyndbg: add print-to-tracefs, selftest with it - RFC
config: arc-randconfig-r043-20211014 (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/jimc/linux/commit/8819a72010473e6a18e27cb4a464fb921b1afbc0
git remote add jimc https://github.com/jimc/linux.git
git fetch --no-tags jimc dd-drm-next
git checkout 8819a72010473e6a18e27cb4a464fb921b1afbc0
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
lib/dynamic_debug.c: In function 'ddebug_tracer_find':
lib/dynamic_debug.c:1272:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1272 | if (trc->key == (u64)modname)
| ^
In file included from include/linux/kernel.h:19,
from lib/dynamic_debug.c:16:
lib/dynamic_debug.c: In function 'ddebug_tracer_add':
>> lib/dynamic_debug.c:1308:62: error: invalid use of undefined type 'struct module'
1308 | pr_warn("tracer-fn already set for %s\n", mod->name);
| ^~
include/linux/printk.h:418:33: note: in definition of macro 'printk_index_wrap'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/printk.h:499:9: note: in expansion of macro 'printk'
499 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~
lib/dynamic_debug.c:1308:17: note: in expansion of macro 'pr_warn'
1308 | pr_warn("tracer-fn already set for %s\n", mod->name);
| ^~~~~~~
lib/dynamic_debug.c:1316:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1316 | trc->key = (u64)dt->ddebugs[0].modname;
| ^
In file included from include/linux/netdevice.h:49,
from lib/dynamic_debug.c:38:
lib/dynamic_debug.c:1317:56: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1317 | hash_add(ddebug_tracer_by_module, &trc->hnode, (u64)dt->ddebugs[0].modname);
| ^
include/linux/hashtable.h:32:17: note: in definition of macro 'hash_min'
32 | (sizeof(val) <= 4 ? hash_32(val, bits) : hash_long(val, bits))
| ^~~
lib/dynamic_debug.c:1317:9: note: in expansion of macro 'hash_add'
1317 | hash_add(ddebug_tracer_by_module, &trc->hnode, (u64)dt->ddebugs[0].modname);
| ^~~~~~~~
lib/dynamic_debug.c:1317:56: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1317 | hash_add(ddebug_tracer_by_module, &trc->hnode, (u64)dt->ddebugs[0].modname);
| ^
include/linux/hashtable.h:32:37: note: in definition of macro 'hash_min'
32 | (sizeof(val) <= 4 ? hash_32(val, bits) : hash_long(val, bits))
| ^~~
lib/dynamic_debug.c:1317:9: note: in expansion of macro 'hash_add'
1317 | hash_add(ddebug_tracer_by_module, &trc->hnode, (u64)dt->ddebugs[0].modname);
| ^~~~~~~~
In file included from include/linux/stringhash.h:7,
from include/linux/dcache.h:15,
from include/linux/fs.h:8,
from include/linux/huge_mm.h:8,
from include/linux/mm.h:727,
from include/linux/kallsyms.h:13,
from lib/dynamic_debug.c:19:
lib/dynamic_debug.c:1317:56: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1317 | hash_add(ddebug_tracer_by_module, &trc->hnode, (u64)dt->ddebugs[0].modname);
| ^
include/linux/hash.h:16:38: note: in definition of macro 'hash_long'
16 | #define hash_long(val, bits) hash_32(val, bits)
| ^~~
include/linux/hashtable.h:61:41: note: in expansion of macro 'hash_min'
61 | hlist_add_head(node, &hashtable[hash_min(key, HASH_BITS(hashtable))])
| ^~~~~~~~
lib/dynamic_debug.c:1317:9: note: in expansion of macro 'hash_add'
1317 | hash_add(ddebug_tracer_by_module, &trc->hnode, (u64)dt->ddebugs[0].modname);
| ^~~~~~~~
In file included from include/linux/kernel.h:19,
from lib/dynamic_debug.c:16:
lib/dynamic_debug.c: In function 'ddebug_tracer_del':
lib/dynamic_debug.c:1331:65: error: invalid use of undefined type 'struct module'
1331 | pr_warn("delete: cant find tracer for %s\n", mod->name);
| ^~
include/linux/printk.h:418:33: note: in definition of macro 'printk_index_wrap'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/printk.h:499:9: note: in expansion of macro 'printk'
499 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~
lib/dynamic_debug.c:1331:17: note: in expansion of macro 'pr_warn'
1331 | pr_warn("delete: cant find tracer for %s\n", mod->name);
| ^~~~~~~
lib/dynamic_debug.c:1335:48: error: invalid use of undefined type 'struct module'
1335 | vpr_info("deleted tracer for %s\n", mod->name);
| ^~
include/linux/printk.h:418:33: note: in definition of macro 'printk_index_wrap'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/printk.h:519:9: note: in expansion of macro 'printk'
519 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~
lib/dynamic_debug.c:132:17: note: in expansion of macro 'pr_info'
132 | pr_info(fmt, ##__VA_ARGS__); \
| ^~~~~~~
lib/dynamic_debug.c:135:33: note: in expansion of macro 'vnpr_info'
135 | #define vpr_info(fmt, ...) vnpr_info(1, fmt, ##__VA_ARGS__)
| ^~~~~~~~~
lib/dynamic_debug.c:1335:9: note: in expansion of macro 'vpr_info'
1335 | vpr_info("deleted tracer for %s\n", mod->name);
| ^~~~~~~~
lib/dynamic_debug.c: In function '__dynamic_debug_tracer_action':
lib/dynamic_debug.c:1355:24: error: invalid use of undefined type 'struct module'
1355 | if (mod->name == dt->mod_name) {
| ^~
lib/dynamic_debug.c:1359:32: error: invalid use of undefined type 'struct module'
1359 | if (!strcmp(mod->name, dt->mod_name)) {
| ^~
In file included from include/linux/kernel.h:19,
from lib/dynamic_debug.c:16:
lib/dynamic_debug.c: In function 'dynamic_debug_register_tracer':
lib/dynamic_debug.c:1378:42: error: invalid use of undefined type 'struct module'
1378 | vpr_info("%s %s\n", __func__, mod->name);
| ^~
include/linux/printk.h:418:33: note: in definition of macro 'printk_index_wrap'
vim +1308 lib/dynamic_debug.c
1295
1296 /*
1297 * key computation is done on insert, such that lookup is trivial.
1298 * We use the modname ref in the 1st ddebug descriptor, the others in
1299 * the table are identical, giving us the module-scope lookup we want.
1300 */
1301 static int ddebug_tracer_add(void (*tracer)(const char *lbl, struct va_format *vaf),
1302 struct module *mod, struct ddebug_table *dt)
1303 {
1304 struct ddebug_tracer *trc;
1305
1306 trc = ddebug_tracer_find(dt->ddebugs[0].modname);
1307 if (trc) {
> 1308 pr_warn("tracer-fn already set for %s\n", mod->name);
1309 return -1;
1310 }
1311 trc = kmalloc(sizeof(*trc), GFP_ATOMIC);
1312 if (!trc)
1313 return -ENOMEM;
1314
1315 trc->tracefn = tracer;
1316 trc->key = (u64)dt->ddebugs[0].modname;
1317 hash_add(ddebug_tracer_by_module, &trc->hnode, (u64)dt->ddebugs[0].modname);
1318
1319 vpr_info("added tracer-fn for module %s\n", dt->ddebugs[0].modname);
1320
1321 return 0;
1322 }
1323
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31754 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-14 21:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-14 21:02 [jimc:dd-drm-next 14/20] lib/dynamic_debug.c:1308:62: error: invalid use of undefined type 'struct module' kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.