lkml.org 
[lkml]   [2021]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectinclude/linux/compiler_types.h:276:27: error: expression in static assertion is not an integer
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab774587903771821b59471cc723bba6d893942
commit: e1edc277e6f6dfb372216522dfc57f9381c39e35 linux/container_of.h: switch to static_assert
date: 5 days ago
config: alpha-randconfig-r012-20211115 (attached as .config)
compiler: alpha-linux-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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e1edc277e6f6dfb372216522dfc57f9381c39e35
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout e1edc277e6f6dfb372216522dfc57f9381c39e35
# 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=alpha SHELL=/bin/bash drivers/gpu/drm/

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 include/linux/list.h:5,
from include/linux/wait.h:7,
from include/linux/dma-fence.h:17,
from drivers/gpu/drm/drm_file.c:35:
drivers/gpu/drm/drm_file.c: In function 'drm_open_helper':
drivers/gpu/drm/drm_file.c:385:56: error: 'pci_root_buses' undeclared (first use in this function); did you mean 'pci_is_root_bus'?
385 | struct pci_bus *b = list_entry(pci_root_buses.next,
| ^~~~~~~~~~~~~~
include/linux/container_of.h:18:33: note: in definition of macro 'container_of'
18 | void *__mptr = (void *)(ptr); \
| ^~~
drivers/gpu/drm/drm_file.c:385:45: note: in expansion of macro 'list_entry'
385 | struct pci_bus *b = list_entry(pci_root_buses.next,
| ^~~~~~~~~~
drivers/gpu/drm/drm_file.c:385:56: note: each undeclared identifier is reported only once for each function it appears in
385 | struct pci_bus *b = list_entry(pci_root_buses.next,
| ^~~~~~~~~~~~~~
include/linux/container_of.h:18:33: note: in definition of macro 'container_of'
18 | void *__mptr = (void *)(ptr); \
| ^~~
drivers/gpu/drm/drm_file.c:385:45: note: in expansion of macro 'list_entry'
385 | struct pci_bus *b = list_entry(pci_root_buses.next,
| ^~~~~~~~~~
In file included from include/linux/container_of.h:5,
from include/linux/list.h:5,
from include/linux/wait.h:7,
from include/linux/dma-fence.h:17,
from drivers/gpu/drm/drm_file.c:35:
>> include/linux/compiler_types.h:276:27: error: expression in static assertion is not an integer
276 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:19:9: note: in expansion of macro 'static_assert'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:19:23: note: in expansion of macro '__same_type'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
include/linux/list.h:513:9: note: in expansion of macro 'container_of'
513 | container_of(ptr, type, member)
| ^~~~~~~~~~~~
drivers/gpu/drm/drm_file.c:385:45: note: in expansion of macro 'list_entry'
385 | struct pci_bus *b = list_entry(pci_root_buses.next,
| ^~~~~~~~~~


vim +276 include/linux/compiler_types.h

eb111869301e15 Rasmus Villemoes 2019-09-13 274
d15155824c5014 Will Deacon 2017-10-24 275 /* Are two types/vars the same type (ignoring qualifiers)? */
d15155824c5014 Will Deacon 2017-10-24 @276 #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
d15155824c5014 Will Deacon 2017-10-24 277

:::::: The code at line 276 was first introduced by commit
:::::: d15155824c5014803d91b829736d249c500bdda6 linux/compiler.h: Split into compiler.h and compiler_types.h

:::::: TO: Will Deacon <will.deacon@arm.com>
:::::: CC: Ingo Molnar <mingo@kernel.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-11-15 05:12    [W:0.081 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site