All of lore.kernel.org
 help / color / mirror / Atom feed
* [jimc:dd-drm-next 13/16] include/linux/compiler_types.h:306:2: error: expected identifier or '(' before 'do'
@ 2021-09-12 18:07 kernel test robot
  2021-09-19 11:52 ` kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2021-09-12 18:07 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
TO: Jim Cromie <jim.cromie@gmail.com>

tree:   https://github.com/jimc/linux.git dd-drm-next
head:   02a6c357b6a5eb02cc6b2ceb5a7a93c809388ae0
commit: f3055f30df9e48d64cf0e489b07b1ff59ec6ec45 [13/16] drm_print: add choice to use dynamic debug in drm-debug
:::::: branch date: 23 hours ago
:::::: commit date: 23 hours ago
config: x86_64-randconfig-s021-20210912 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://github.com/jimc/linux/commit/f3055f30df9e48d64cf0e489b07b1ff59ec6ec45
        git remote add jimc https://github.com/jimc/linux.git
        git fetch --no-tags jimc dd-drm-next
        git checkout f3055f30df9e48d64cf0e489b07b1ff59ec6ec45
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 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 <command-line>:
>> include/linux/compiler_types.h:306:2: error: expected identifier or '(' before 'do'
     306 |  do {        \
         |  ^~
   include/linux/compiler_types.h:316:2: note: in expansion of macro '__compiletime_assert'
     316 |  __compiletime_assert(condition, msg, prefix, suffix)
         |  ^~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:328:2: note: in expansion of macro '_compiletime_assert'
     328 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:282:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     282 |  BUILD_BUG_ON_MSG(1, "you need -DDYNAMIC_DEBUG_MODULE in compile")
         |  ^~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_debug.c:65:1: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_CATEGORIES'
      65 | DEFINE_DYNAMIC_DEBUG_CATEGORIES(debug_dc, __debug_dc,
         | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/compiler_types.h:310:4: error: expected identifier or '(' before 'while'
     310 |  } while (0)
         |    ^~~~~
   include/linux/compiler_types.h:316:2: note: in expansion of macro '__compiletime_assert'
     316 |  __compiletime_assert(condition, msg, prefix, suffix)
         |  ^~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:328:2: note: in expansion of macro '_compiletime_assert'
     328 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:282:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     282 |  BUILD_BUG_ON_MSG(1, "you need -DDYNAMIC_DEBUG_MODULE in compile")
         |  ^~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_debug.c:65:1: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_CATEGORIES'
      65 | DEFINE_DYNAMIC_DEBUG_CATEGORIES(debug_dc, __debug_dc,
         | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +306 include/linux/compiler_types.h

eb5c2d4b45e3d2 Will Deacon 2020-07-21  303  
eb5c2d4b45e3d2 Will Deacon 2020-07-21  304  #ifdef __OPTIMIZE__
eb5c2d4b45e3d2 Will Deacon 2020-07-21  305  # define __compiletime_assert(condition, msg, prefix, suffix)		\
eb5c2d4b45e3d2 Will Deacon 2020-07-21 @306  	do {								\
eb5c2d4b45e3d2 Will Deacon 2020-07-21  307  		extern void prefix ## suffix(void) __compiletime_error(msg); \
eb5c2d4b45e3d2 Will Deacon 2020-07-21  308  		if (!(condition))					\
eb5c2d4b45e3d2 Will Deacon 2020-07-21  309  			prefix ## suffix();				\
eb5c2d4b45e3d2 Will Deacon 2020-07-21 @310  	} while (0)
eb5c2d4b45e3d2 Will Deacon 2020-07-21  311  #else
eb5c2d4b45e3d2 Will Deacon 2020-07-21  312  # define __compiletime_assert(condition, msg, prefix, suffix) do { } while (0)
eb5c2d4b45e3d2 Will Deacon 2020-07-21  313  #endif
eb5c2d4b45e3d2 Will Deacon 2020-07-21  314  

:::::: The code at line 306 was first introduced by commit
:::::: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h

:::::: TO: Will Deacon <will@kernel.org>
:::::: CC: Will Deacon <will@kernel.org>

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [jimc:dd-drm-next 13/16] include/linux/compiler_types.h:306:2: error: expected identifier or '(' before 'do'
  2021-09-12 18:07 [jimc:dd-drm-next 13/16] include/linux/compiler_types.h:306:2: error: expected identifier or '(' before 'do' kernel test robot
@ 2021-09-19 11:52 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-09-19 11:52 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://github.com/jimc/linux.git dd-drm-next
head:   02a6c357b6a5eb02cc6b2ceb5a7a93c809388ae0
commit: d486567f7959a84cd951ec7af2951e6698e8eeef drm_print: add choice to use dynamic debug in drm-debug
config: x86_64-randconfig-s021-20210912 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
         git remote add jimc https://github.com/jimc/linux.git
         git fetch --no-tags jimc dd-drm-next
         git checkout d486567f7959a84cd951ec7af2951e6698e8eeef
         # save the attached .config to linux build tree
         make ARCH=x86_64 olddefconfig
         make ARCH=x86_64

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 <command-line>:
 >> include/linux/compiler_types.h:306:2: error: expected identifier or '(' before 'do'
      306 |  do {        \
          |  ^~
    include/linux/compiler_types.h:316:2: note: in expansion of macro '__compiletime_assert'
      316 |  __compiletime_assert(condition, msg, prefix, suffix)
          |  ^~~~~~~~~~~~~~~~~~~~
    include/linux/compiler_types.h:328:2: note: in expansion of macro '_compiletime_assert'
      328 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
          |  ^~~~~~~~~~~~~~~~~~~
    include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
       39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
          |                                     ^~~~~~~~~~~~~~~~~~
    include/linux/dynamic_debug.h:282:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      282 |  BUILD_BUG_ON_MSG(1, "you need -DDYNAMIC_DEBUG_MODULE in compile")
          |  ^~~~~~~~~~~~~~~~
    drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_debug.c:65:1: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_CATEGORIES'
       65 | DEFINE_DYNAMIC_DEBUG_CATEGORIES(debug_dc, __debug_dc,
          | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 >> include/linux/compiler_types.h:310:4: error: expected identifier or '(' before 'while'
      310 |  } while (0)
          |    ^~~~~
    include/linux/compiler_types.h:316:2: note: in expansion of macro '__compiletime_assert'
      316 |  __compiletime_assert(condition, msg, prefix, suffix)
          |  ^~~~~~~~~~~~~~~~~~~~
    include/linux/compiler_types.h:328:2: note: in expansion of macro '_compiletime_assert'
      328 |  _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
          |  ^~~~~~~~~~~~~~~~~~~
    include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
       39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
          |                                     ^~~~~~~~~~~~~~~~~~
    include/linux/dynamic_debug.h:282:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      282 |  BUILD_BUG_ON_MSG(1, "you need -DDYNAMIC_DEBUG_MODULE in compile")
          |  ^~~~~~~~~~~~~~~~
    drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_debug.c:65:1: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_CATEGORIES'
       65 | DEFINE_DYNAMIC_DEBUG_CATEGORIES(debug_dc, __debug_dc,
          | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +306 include/linux/compiler_types.h

eb5c2d4b45e3d2 Will Deacon 2020-07-21  303
eb5c2d4b45e3d2 Will Deacon 2020-07-21  304  #ifdef __OPTIMIZE__
eb5c2d4b45e3d2 Will Deacon 2020-07-21  305  # define __compiletime_assert(condition, msg, prefix, suffix)		\
eb5c2d4b45e3d2 Will Deacon 2020-07-21 @306  	do {								\
eb5c2d4b45e3d2 Will Deacon 2020-07-21  307  		extern void prefix ## suffix(void) __compiletime_error(msg); \
eb5c2d4b45e3d2 Will Deacon 2020-07-21  308  		if (!(condition))					\
eb5c2d4b45e3d2 Will Deacon 2020-07-21  309  			prefix ## suffix();				\
eb5c2d4b45e3d2 Will Deacon 2020-07-21 @310  	} while (0)
eb5c2d4b45e3d2 Will Deacon 2020-07-21  311  #else
eb5c2d4b45e3d2 Will Deacon 2020-07-21  312  # define __compiletime_assert(condition, msg, prefix, suffix) do { } while (0)
eb5c2d4b45e3d2 Will Deacon 2020-07-21  313  #endif
eb5c2d4b45e3d2 Will Deacon 2020-07-21  314

:::::: The code at line 306 was first introduced by commit
:::::: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h

:::::: TO: Will Deacon <will@kernel.org>
:::::: CC: Will Deacon <will@kernel.org>

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-19 11:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-12 18:07 [jimc:dd-drm-next 13/16] include/linux/compiler_types.h:306:2: error: expected identifier or '(' before 'do' kernel test robot
2021-09-19 11:52 ` 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.