[asm-generic:clkdev 1/5] arch/mips/ar7/clock.c:428:28: error: array type has incomplete element type 'struct clkdev_table'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git clkdev
head:   3c150d2578b204c2e18c7ac6d967b43a614befbe
commit: 991cb086b5cfcd6ad953a64c6ce384bbd8595ded [1/5] mips: ar7: convert to clkdev_lookup
config: mips-ar7_defconfig (attached as .config)
compiler: mipsel-linux-gcc (GCC) 9.3.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://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git/commit/?id=991cb086b5cfcd6ad953a64c6ce384bbd8595ded
        git remote add asm-generic https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git
        git fetch --no-tags asm-generic clkdev
        git checkout 991cb086b5cfcd6ad953a64c6ce384bbd8595ded
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> arch/mips/ar7/clock.c:428:28: error: array type has incomplete element type 'struct clkdev_table'
     428 | static struct clkdev_table clkdev_table[] = {
         |                            ^~~~~~~~~~~~
   In file included from arch/mips/ar7/clock.c:17:
>> include/linux/clkdev.h:28:3: error: field name not in record or union initializer
      28 |   .dev_id = d, \
         |   ^
   arch/mips/ar7/clock.c:429:2: note: in expansion of macro 'CLKDEV_INIT'
     429 |  CLKDEV_INIT(NULL, "bus", &bus_clk),
         |  ^~~~~~~~~~~
   include/linux/clkdev.h:28:3: note: (near initialization for 'clkdev_table')
      28 |   .dev_id = d, \
         |   ^
   arch/mips/ar7/clock.c:429:2: note: in expansion of macro 'CLKDEV_INIT'
     429 |  CLKDEV_INIT(NULL, "bus", &bus_clk),
         |  ^~~~~~~~~~~
   include/linux/clkdev.h:29:3: error: field name not in record or union initializer
      29 |   .con_id = n, \
         |   ^
   arch/mips/ar7/clock.c:429:2: note: in expansion of macro 'CLKDEV_INIT'
     429 |  CLKDEV_INIT(NULL, "bus", &bus_clk),
         |  ^~~~~~~~~~~
   include/linux/clkdev.h:29:3: note: (near initialization for 'clkdev_table')
      29 |   .con_id = n, \
         |   ^
   arch/mips/ar7/clock.c:429:2: note: in expansion of macro 'CLKDEV_INIT'
     429 |  CLKDEV_INIT(NULL, "bus", &bus_clk),
         |  ^~~~~~~~~~~
   include/linux/clkdev.h:30:3: error: field name not in record or union initializer
      30 |   .clk = c, \
         |   ^
   arch/mips/ar7/clock.c:429:2: note: in expansion of macro 'CLKDEV_INIT'
     429 |  CLKDEV_INIT(NULL, "bus", &bus_clk),
         |  ^~~~~~~~~~~
   include/linux/clkdev.h:30:3: note: (near initialization for 'clkdev_table')
      30 |   .clk = c, \
         |   ^
   arch/mips/ar7/clock.c:429:2: note: in expansion of macro 'CLKDEV_INIT'
     429 |  CLKDEV_INIT(NULL, "bus", &bus_clk),
         |  ^~~~~~~~~~~
>> include/linux/clkdev.h:28:3: error: field name not in record or union initializer
      28 |   .dev_id = d, \
         |   ^
   arch/mips/ar7/clock.c:431:2: note: in expansion of macro 'CLKDEV_INIT'
     431 |  CLKDEV_INIT("cpmac.0", "cpmac", &vbus_clk),
         |  ^~~~~~~~~~~
   include/linux/clkdev.h:28:3: note: (near initialization for 'clkdev_table')
      28 |   .dev_id = d, \
         |   ^
   arch/mips/ar7/clock.c:431:2: note: in expansion of macro 'CLKDEV_INIT'
     431 |  CLKDEV_INIT("cpmac.0", "cpmac", &vbus_clk),
         |  ^~~~~~~~~~~
   include/linux/clkdev.h:29:3: error: field name not in record or union initializer
      29 |   .con_id = n, \
         |   ^
   arch/mips/ar7/clock.c:431:2: note: in expansion of macro 'CLKDEV_INIT'
     431 |  CLKDEV_INIT("cpmac.0", "cpmac", &vbus_clk),
         |  ^~~~~~~~~~~
   include/linux/clkdev.h:29:3: note: (near initialization for 'clkdev_table')
      29 |   .con_id = n, \
         |   ^
   arch/mips/ar7/clock.c:431:2: note: in expansion of macro 'CLKDEV_INIT'
     431 |  CLKDEV_INIT("cpmac.0", "cpmac", &vbus_clk),
         |  ^~~~~~~~~~~
   include/linux/clkdev.h:30:3: error: field name not in record or union initializer
      30 |   .clk = c, \
         |   ^
   arch/mips/ar7/clock.c:431:2: note: in expansion of macro 'CLKDEV_INIT'
     431 |  CLKDEV_INIT("cpmac.0", "cpmac", &vbus_clk),
         |  ^~~~~~~~~~~
   include/linux/clkdev.h:30:3: note: (near initialization for 'clkdev_table')
      30 |   .clk = c, \
         |   ^
   arch/mips/ar7/clock.c:431:2: note: in expansion of macro 'CLKDEV_INIT'
     431 |  CLKDEV_INIT("cpmac.0", "cpmac", &vbus_clk),
         |  ^~~~~~~~~~~
>> include/linux/clkdev.h:28:3: error: field name not in record or union initializer
      28 |   .dev_id = d, \
         |   ^
   arch/mips/ar7/clock.c:432:2: note: in expansion of macro 'CLKDEV_INIT'
     432 |  CLKDEV_INIT("cpmac.1", "cpmac", &vbus_clk),
         |  ^~~~~~~~~~~
   include/linux/clkdev.h:28:3: note: (near initialization for 'clkdev_table')
      28 |   .dev_id = d, \
         |   ^
   arch/mips/ar7/clock.c:432:2: note: in expansion of macro 'CLKDEV_INIT'
     432 |  CLKDEV_INIT("cpmac.1", "cpmac", &vbus_clk),
         |  ^~~~~~~~~~~
   include/linux/clkdev.h:29:3: error: field name not in record or union initializer
      29 |   .con_id = n, \
         |   ^
   arch/mips/ar7/clock.c:432:2: note: in expansion of macro 'CLKDEV_INIT'
     432 |  CLKDEV_INIT("cpmac.1", "cpmac", &vbus_clk),
         |  ^~~~~~~~~~~
   include/linux/clkdev.h:29:3: note: (near initialization for 'clkdev_table')
      29 |   .con_id = n, \
         |   ^
   arch/mips/ar7/clock.c:432:2: note: in expansion of macro 'CLKDEV_INIT'
     432 |  CLKDEV_INIT("cpmac.1", "cpmac", &vbus_clk),
         |  ^~~~~~~~~~~
   include/linux/clkdev.h:30:3: error: field name not in record or union initializer
      30 |   .clk = c, \
         |   ^
   arch/mips/ar7/clock.c:432:2: note: in expansion of macro 'CLKDEV_INIT'
     432 |  CLKDEV_INIT("cpmac.1", "cpmac", &vbus_clk),
         |  ^~~~~~~~~~~
   include/linux/clkdev.h:30:3: note: (near initialization for 'clkdev_table')
      30 |   .clk = c, \
         |   ^
   arch/mips/ar7/clock.c:432:2: note: in expansion of macro 'CLKDEV_INIT'
     432 |  CLKDEV_INIT("cpmac.1", "cpmac", &vbus_clk),
         |  ^~~~~~~~~~~
>> include/linux/clkdev.h:28:3: error: field name not in record or union initializer
      28 |   .dev_id = d, \
         |   ^
   arch/mips/ar7/clock.c:433:2: note: in expansion of macro 'CLKDEV_INIT'
     433 |  CLKDEV_INIT(NULL, "cpu", &cpu_clk)
         |  ^~~~~~~~~~~
   include/linux/clkdev.h:28:3: note: (near initialization for 'clkdev_table')
      28 |   .dev_id = d, \
         |   ^
   arch/mips/ar7/clock.c:433:2: note: in expansion of macro 'CLKDEV_INIT'
     433 |  CLKDEV_INIT(NULL, "cpu", &cpu_clk)
         |  ^~~~~~~~~~~
   include/linux/clkdev.h:29:3: error: field name not in record or union initializer
      29 |   .con_id = n, \
         |   ^
   arch/mips/ar7/clock.c:433:2: note: in expansion of macro 'CLKDEV_INIT'
     433 |  CLKDEV_INIT(NULL, "cpu", &cpu_clk)
         |  ^~~~~~~~~~~
   include/linux/clkdev.h:29:3: note: (near initialization for 'clkdev_table')
      29 |   .con_id = n, \
         |   ^
   arch/mips/ar7/clock.c:433:2: note: in expansion of macro 'CLKDEV_INIT'
     433 |  CLKDEV_INIT(NULL, "cpu", &cpu_clk)
         |  ^~~~~~~~~~~
   include/linux/clkdev.h:30:3: error: field name not in record or union initializer
      30 |   .clk = c, \
         |   ^
   arch/mips/ar7/clock.c:433:2: note: in expansion of macro 'CLKDEV_INIT'
     433 |  CLKDEV_INIT(NULL, "cpu", &cpu_clk)
         |  ^~~~~~~~~~~
   include/linux/clkdev.h:30:3: note: (near initialization for 'clkdev_table')
      30 |   .clk = c, \
         |   ^
   arch/mips/ar7/clock.c:433:2: note: in expansion of macro 'CLKDEV_INIT'
     433 |  CLKDEV_INIT(NULL, "cpu", &cpu_clk)
         |  ^~~~~~~~~~~
>> include/linux/clkdev.h:27:2: error: expected '}' before '{' token
      27 |  {   \
         |  ^
   arch/mips/ar7/clock.c:434:2: note: in expansion of macro 'CLKDEV_INIT'
     434 |  CLKDEV_INIT(NULL, "dsp", &dsp_clk),
         |  ^~~~~~~~~~~
   arch/mips/ar7/clock.c:428:45: note: to match this '{'
     428 | static struct clkdev_table clkdev_table[] = {
         |                                             ^
   In file included from include/linux/bits.h:22,
                    from include/linux/bitops.h:6,
                    from include/linux/kernel.h:12,
                    from arch/mips/ar7/clock.c:8:
   arch/mips/ar7/clock.c: In function 'ar7_init_clocks':
>> include/linux/build_bug.h:16:51: error: bit-field '<anonymous>' width not an integer constant
      16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
         |                                                   ^
   include/linux/compiler.h:240:28: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
     240 | #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
         |                            ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:42:59: note: in expansion of macro '__must_be_array'
      42 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
         |                                                           ^~~~~~~~~~~~~~~
   arch/mips/ar7/clock.c:455:34: note: in expansion of macro 'ARRAY_SIZE'
     455 |  clkdev_add_table(&clkdev_table, ARRAY_SIZE(clkdev_table);
         |                                  ^~~~~~~~~~
>> arch/mips/ar7/clock.c:455:58: error: expected ')' before ';' token
     455 |  clkdev_add_table(&clkdev_table, ARRAY_SIZE(clkdev_table);
         |                                                          ^
>> arch/mips/ar7/clock.c:455:59: error: expected ';' before '}' token
     455 |  clkdev_add_table(&clkdev_table, ARRAY_SIZE(clkdev_table);
         |                                                           ^
         |                                                           ;
     456 | }
         | ~                                                          
   At top level:
   arch/mips/ar7/clock.c:428:28: warning: 'clkdev_table' defined but not used [-Wunused-variable]
     428 | static struct clkdev_table clkdev_table[] = {
         |                            ^~~~~~~~~~~~


vim +428 arch/mips/ar7/clock.c

   427	
 > 428	static struct clkdev_table clkdev_table[] = {
   429		CLKDEV_INIT(NULL, "bus", &bus_clk),
   430		/* cpmac and vbus share the same rate */
   431		CLKDEV_INIT("cpmac.0", "cpmac", &vbus_clk),
   432		CLKDEV_INIT("cpmac.1", "cpmac", &vbus_clk),
   433		CLKDEV_INIT(NULL, "cpu", &cpu_clk)
   434		CLKDEV_INIT(NULL, "dsp", &dsp_clk),
   435		CLKDEV_INIT(NULL, "vbus", &vbus_clk),
   436	};
   437	
   438	void __init ar7_init_clocks(void)
   439	{
   440		switch (ar7_chip_id()) {
   441		case AR7_CHIP_7100:
   442		case AR7_CHIP_7200:
   443			tnetd7200_init_clocks();
   444			break;
   445		case AR7_CHIP_7300:
   446			dsp_clk.rate = tnetd7300_dsp_clock();
   447			tnetd7300_init_clocks();
   448			break;
   449		default:
   450			break;
   451		}
   452		/* adjust vbus clock rate */
   453		vbus_clk.rate = bus_clk.rate / 2;
   454	
 > 455		clkdev_add_table(&clkdev_table, ARRAY_SIZE(clkdev_table);
   456	}
   457	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux