* [djiang:cxl/extended-linear 2/4] include/linux/compiler.h:245:77: error: expression in static assertion is not an integer
@ 2024-12-05 4:24 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-12-05 4:24 UTC (permalink / raw)
To: Dave Jiang; +Cc: oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djiang/linux.git cxl/extended-linear
head: cc3b7ba41f14d666907c81d2b5079170659e37b1
commit: 6576e541fcc39fd4f68ddaf2e4851d7eb30c9791 [2/4] acpi/hmat / cxl: Add extended linear cache support for CXL
config: x86_64-randconfig-161 (https://download.01.org/0day-ci/archive/20241205/202412051201.PfxO648T-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241205/202412051201.PfxO648T-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/202412051201.PfxO648T-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from include/linux/i2c.h:13,
from drivers/media/pci/cx25821/cx25821.h:14,
from drivers/media/pci/cx25821/cx25821-alsa.c:29:
include/linux/acpi.h:1105:19: error: redefinition of 'hmat_get_extended_linear_cache_size'
1105 | static inline int hmat_get_extended_linear_cache_size(struct resource *backing_res,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/acpi.h:448:19: note: previous definition of 'hmat_get_extended_linear_cache_size' with type 'int(struct resource *, int, resource_size_t *)' {aka 'int(struct resource *, int, long long unsigned int *)'}
448 | static inline int hmat_get_extended_linear_cache_size(struct resource *backing_res,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/build_bug.h:5,
from include/linux/container_of.h:5,
from include/linux/list.h:5,
from include/linux/module.h:12,
from drivers/media/pci/cx25821/cx25821-alsa.c:12:
>> include/linux/compiler.h:245:77: error: expression in static assertion is not an integer
245 | #define __BUILD_BUG_ON_ZERO_MSG(e, msg) ((int)sizeof(struct {_Static_assert(!(e), msg);}))
| ^
include/linux/compiler.h:249:33: note: in expansion of macro '__BUILD_BUG_ON_ZERO_MSG'
249 | #define __must_be_array(a) __BUILD_BUG_ON_ZERO_MSG(__same_type((a), &(a)[0]), "must be array")
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/array_size.h:11:59: note: in expansion of macro '__must_be_array'
11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
| ^~~~~~~~~~~~~~~
include/linux/moduleparam.h:521:20: note: in expansion of macro 'ARRAY_SIZE'
521 | = { .max = ARRAY_SIZE(array), .num = nump, \
| ^~~~~~~~~~
include/linux/moduleparam.h:505:9: note: in expansion of macro 'module_param_array_named'
505 | module_param_array_named(name, name, type, nump, perm)
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/pci/cx25821/cx25821-alsa.c:97:1: note: in expansion of macro 'module_param_array'
97 | module_param_array(index, int, NULL, 0444);
| ^~~~~~~~~~~~~~~~~~
drivers/media/pci/cx25821/cx25821-alsa.c:90:12: warning: 'index' defined but not used [-Wunused-variable]
90 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
| ^~~~~
--
In file included from include/linux/i2c.h:13,
from cx25821.h:14,
from cx25821-alsa.c:29:
include/linux/acpi.h:1105:19: error: redefinition of 'hmat_get_extended_linear_cache_size'
1105 | static inline int hmat_get_extended_linear_cache_size(struct resource *backing_res,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/acpi.h:448:19: note: previous definition of 'hmat_get_extended_linear_cache_size' with type 'int(struct resource *, int, resource_size_t *)' {aka 'int(struct resource *, int, long long unsigned int *)'}
448 | static inline int hmat_get_extended_linear_cache_size(struct resource *backing_res,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/build_bug.h:5,
from include/linux/container_of.h:5,
from include/linux/list.h:5,
from include/linux/module.h:12,
from cx25821-alsa.c:12:
>> include/linux/compiler.h:245:77: error: expression in static assertion is not an integer
245 | #define __BUILD_BUG_ON_ZERO_MSG(e, msg) ((int)sizeof(struct {_Static_assert(!(e), msg);}))
| ^
include/linux/compiler.h:249:33: note: in expansion of macro '__BUILD_BUG_ON_ZERO_MSG'
249 | #define __must_be_array(a) __BUILD_BUG_ON_ZERO_MSG(__same_type((a), &(a)[0]), "must be array")
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/array_size.h:11:59: note: in expansion of macro '__must_be_array'
11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
| ^~~~~~~~~~~~~~~
include/linux/moduleparam.h:521:20: note: in expansion of macro 'ARRAY_SIZE'
521 | = { .max = ARRAY_SIZE(array), .num = nump, \
| ^~~~~~~~~~
include/linux/moduleparam.h:505:9: note: in expansion of macro 'module_param_array_named'
505 | module_param_array_named(name, name, type, nump, perm)
| ^~~~~~~~~~~~~~~~~~~~~~~~
cx25821-alsa.c:97:1: note: in expansion of macro 'module_param_array'
97 | module_param_array(index, int, NULL, 0444);
| ^~~~~~~~~~~~~~~~~~
cx25821-alsa.c:90:12: warning: 'index' defined but not used [-Wunused-variable]
90 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
| ^~~~~
vim +245 include/linux/compiler.h
^1da177e4c3f415 Linus Torvalds 2005-04-16 241
d7a516c6eeae291 Philipp Reisner 2024-11-15 242 #ifdef __CHECKER__
d7a516c6eeae291 Philipp Reisner 2024-11-15 243 #define __BUILD_BUG_ON_ZERO_MSG(e, msg) (0)
d7a516c6eeae291 Philipp Reisner 2024-11-15 244 #else /* __CHECKER__ */
d7a516c6eeae291 Philipp Reisner 2024-11-15 @245 #define __BUILD_BUG_ON_ZERO_MSG(e, msg) ((int)sizeof(struct {_Static_assert(!(e), msg);}))
d7a516c6eeae291 Philipp Reisner 2024-11-15 246 #endif /* __CHECKER__ */
d7a516c6eeae291 Philipp Reisner 2024-11-15 247
:::::: The code at line 245 was first introduced by commit
:::::: d7a516c6eeae29144649f1c3f586fa580ec9e040 compiler.h: Fix undefined BUILD_BUG_ON_ZERO()
:::::: TO: Philipp Reisner <philipp.reisner@linbit.com>
:::::: CC: Kees Cook <kees@kernel.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-12-05 4:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-05 4:24 [djiang:cxl/extended-linear 2/4] include/linux/compiler.h:245:77: error: expression in static assertion is not an integer 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.