All of lore.kernel.org
 help / color / mirror / Atom feed
* [jimc:dd-drm-next 2/11] lib/dynamic_debug.c:609:54: error: incomplete definition of type 'struct module'
@ 2021-08-20 13:11 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-08-20 13:11 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 6822 bytes --]

tree:   https://github.com/jimc/linux.git dd-drm-next
head:   334f24cc73a3d5051217851d4616cb89c2d152dc
commit: 0322252e3c15fa80be1780ca68dde765a57f2c4b [2/11] dyndbg: add DEFINE_DYNAMIC_DEBUG_CATEGORIES and callbacks
config: riscv-randconfig-r042-20210818 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d9c5613e856cf2addfbf892fc4c1ce9ef9feceaa)
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
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://github.com/jimc/linux/commit/0322252e3c15fa80be1780ca68dde765a57f2c4b
        git remote add jimc https://github.com/jimc/linux.git
        git fetch --no-tags jimc dd-drm-next
        git checkout 0322252e3c15fa80be1780ca68dde765a57f2c4b
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=riscv 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 >>):

   In file included from lib/dynamic_debug.c:35:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/riscv/include/asm/io.h:136:
   include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __raw_readb(PCI_IOBASE + addr);
                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                                                     ^
   In file included from lib/dynamic_debug.c:35:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/riscv/include/asm/io.h:136:
   include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                                                     ^
   In file included from lib/dynamic_debug.c:35:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/riscv/include/asm/io.h:136:
   include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writeb(value, PCI_IOBASE + addr);
                               ~~~~~~~~~~ ^
   include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:1024:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
                                                     ~~~~~~~~~~ ^
>> lib/dynamic_debug.c:609:54: error: incomplete definition of type 'struct module'
                   matches = dynamic_debug_exec_queries(query, kp->mod->name);
                                                               ~~~~~~~^
   include/linux/jump_label.h:201:8: note: forward declaration of 'struct module'
   struct module;
          ^
   7 warnings and 1 error generated.


vim +609 lib/dynamic_debug.c

   579	
   580	#define FMT_QUERY_SIZE 128 /* typically need <40 */
   581	/**
   582	 * param_set_dyndbg() - drm.debug style bits=>categories setter
   583	 * @instr: string echo>d to sysfs
   584	 * @kp:    struct kernel_param* ->data has bitmap
   585	 * Exported to support DEFINE_DYNAMIC_DEBUG_CATEGORIES
   586	 */
   587	int param_set_dyndbg(const char *instr, const struct kernel_param *kp)
   588	{
   589		unsigned long inbits;
   590		int rc, i, matches = 0, totct = 0;
   591		char query[FMT_QUERY_SIZE];
   592		const struct dyndbg_bitdesc *bitmap = kp->data;
   593	
   594		if (!bitmap) {
   595			pr_err("set_dyndbg: no bits=>queries map\n");
   596			return -EINVAL;
   597		}
   598		rc = kstrtoul(instr, 0, &inbits);
   599		if (rc) {
   600			pr_err("set_dyndbg: failed\n");
   601			return rc;
   602		}
   603		vpr_info("set_dyndbg: input 0x%lx\n", inbits);
   604	
   605		for (i = 0; bitmap->prefix; i++, bitmap++) {
   606			snprintf(query, FMT_QUERY_SIZE, "format '^%s' %cp", bitmap->prefix,
   607				 test_bit(i, &inbits) ? '+' : '-');
   608	
 > 609			matches = dynamic_debug_exec_queries(query, kp->mod->name);
   610	
   611			v2pr_info("bit-%d: %d matches on '%s'\n", i, matches, query);
   612			totct += matches;
   613		}
   614		vpr_info("total matches: %d\n", totct);
   615		return 0;
   616	}
   617	EXPORT_SYMBOL(param_set_dyndbg);
   618	

---
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: 27136 bytes --]

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

only message in thread, other threads:[~2021-08-20 13:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-20 13:11 [jimc:dd-drm-next 2/11] lib/dynamic_debug.c:609:54: error: incomplete definition of 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.