lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202209070704.0gYrEn2J-lkp@intel.com>
Date:   Wed, 7 Sep 2022 08:06:06 +0800
From:   kernel test robot <lkp@...el.com>
To:     Chengming Zhou <zhouchengming@...edance.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Peter Zijlstra <peterz@...radead.org>
Subject: [peterz-queue:sched/psi 11/11] include/linux/build_bug.h:16:51:
 error: bit-field '<anonymous>' width not an integer constant

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/psi
head:   d7d96a4af912e8aef3869d24c551924b9f8a7896
commit: d7d96a4af912e8aef3869d24c551924b9f8a7896 [11/11] sched/psi: Per-cgroup PSI accounting disable/re-enable interface
config: arm-randconfig-r006-20220906
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.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/peterz/queue.git/commit/?id=d7d96a4af912e8aef3869d24c551924b9f8a7896
        git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
        git fetch --no-tags peterz-queue sched/psi
        git checkout d7d96a4af912e8aef3869d24c551924b9f8a7896
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/media/usb/em28xx/ sound/pci/hda/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/cgroup.h:28,
                    from include/linux/memcontrol.h:13,
                    from include/linux/swap.h:9,
                    from include/linux/suspend.h:5,
                    from include/linux/regulator/consumer.h:35,
                    from include/linux/i2c.h:19,
                    from drivers/media/usb/em28xx/em28xx.h:22,
                    from drivers/media/usb/em28xx/em28xx-audio.c:14:
   include/linux/cgroup-defs.h:432:38: error: 'NR_PSI_RESOURCES' undeclared here (not in a function); did you mean 'ACPI_RESOURCES'?
     432 |         struct cgroup_file psi_files[NR_PSI_RESOURCES];
         |                                      ^~~~~~~~~~~~~~~~
         |                                      ACPI_RESOURCES
   drivers/media/usb/em28xx/em28xx-audio.c: In function 'em28xx_audio_init':
>> drivers/media/usb/em28xx/em28xx-audio.c:808:29: warning: variable 'devnr' set but not used [-Wunused-but-set-variable]
     808 |         static int          devnr;
         |                             ^~~~~
   drivers/media/usb/em28xx/em28xx-audio.c: At top level:
   drivers/media/usb/em28xx/em28xx-audio.c:47:12: warning: 'index' defined but not used [-Wunused-variable]
      47 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
         |            ^~~~~
--
   In file included from include/linux/cgroup.h:28,
                    from include/linux/memcontrol.h:13,
                    from include/linux/swap.h:9,
                    from include/linux/suspend.h:5,
                    from include/linux/regulator/consumer.h:35,
                    from include/linux/i2c.h:19,
                    from include/uapi/linux/fb.h:6,
                    from include/linux/fb.h:7,
                    from include/linux/vga_switcheroo.h:34,
                    from sound/pci/hda/hda_intel.c:52:
   include/linux/cgroup-defs.h:432:38: error: 'NR_PSI_RESOURCES' undeclared here (not in a function); did you mean 'ACPI_RESOURCES'?
     432 |         struct cgroup_file psi_files[NR_PSI_RESOURCES];
         |                                      ^~~~~~~~~~~~~~~~
         |                                      ACPI_RESOURCES
   In file included from include/linux/bits.h:22,
                    from include/linux/bitops.h:6,
                    from include/linux/log2.h:12,
                    from include/asm-generic/div64.h:55,
                    from arch/arm/include/asm/div64.h:107,
                    from include/linux/math.h:6,
                    from include/linux/delay.h:22,
                    from sound/pci/hda/hda_intel.c:23:
>> 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:33: 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:55:59: note: in expansion of macro '__must_be_array'
      55 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
         |                                                           ^~~~~~~~~~~~~~~
   include/linux/moduleparam.h:517:20: note: in expansion of macro 'ARRAY_SIZE'
     517 |         = { .max = ARRAY_SIZE(array), .num = nump,                      \
         |                    ^~~~~~~~~~
   include/linux/moduleparam.h:501:9: note: in expansion of macro 'module_param_array_named'
     501 |         module_param_array_named(name, name, type, nump, perm)
         |         ^~~~~~~~~~~~~~~~~~~~~~~~
   sound/pci/hda/hda_intel.c:130:1: note: in expansion of macro 'module_param_array'
     130 | module_param_array(index, int, NULL, 0444);
         | ^~~~~~~~~~~~~~~~~~
   sound/pci/hda/hda_intel.c:110:12: warning: 'index' defined but not used [-Wunused-variable]
     110 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
         |            ^~~~~


vim +16 include/linux/build_bug.h

bc6245e5efd70c4 Ian Abbott       2017-07-10   6  
bc6245e5efd70c4 Ian Abbott       2017-07-10   7  #ifdef __CHECKER__
bc6245e5efd70c4 Ian Abbott       2017-07-10   8  #define BUILD_BUG_ON_ZERO(e) (0)
bc6245e5efd70c4 Ian Abbott       2017-07-10   9  #else /* __CHECKER__ */
bc6245e5efd70c4 Ian Abbott       2017-07-10  10  /*
bc6245e5efd70c4 Ian Abbott       2017-07-10  11   * Force a compilation error if condition is true, but also produce a
8788994376d84d6 Rikard Falkeborn 2019-12-04  12   * result (of value 0 and type int), so the expression can be used
bc6245e5efd70c4 Ian Abbott       2017-07-10  13   * e.g. in a structure initializer (or where-ever else comma expressions
bc6245e5efd70c4 Ian Abbott       2017-07-10  14   * aren't permitted).
bc6245e5efd70c4 Ian Abbott       2017-07-10  15   */
8788994376d84d6 Rikard Falkeborn 2019-12-04 @16  #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
527edbc18a70e74 Masahiro Yamada  2019-01-03  17  #endif /* __CHECKER__ */
527edbc18a70e74 Masahiro Yamada  2019-01-03  18  

:::::: The code at line 16 was first introduced by commit
:::::: 8788994376d84d627450fd0d67deb6a66ddf07d7 linux/build_bug.h: change type to int

:::::: TO: Rikard Falkeborn <rikard.falkeborn@...il.com>
:::::: CC: Linus Torvalds <torvalds@...ux-foundation.org>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (210407 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ