All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [jimc:dd-drm-next 13/16] include/linux/compiler_types.h:306:2: error: expected identifier or '(' before 'do'
Date: Mon, 13 Sep 2021 02:07:17 +0800	[thread overview]
Message-ID: <202109130210.m6hfmsfI-lkp@intel.com> (raw)

[-- 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 --]

             reply	other threads:[~2021-09-12 18:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-12 18:07 kernel test robot [this message]
2021-09-19 11:52 ` [jimc:dd-drm-next 13/16] include/linux/compiler_types.h:306:2: error: expected identifier or '(' before 'do' kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202109130210.m6hfmsfI-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.