All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jim Cromie <jim.cromie@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [jimc:maph 1/1] lib/test_map_h.c:25:39: error: expected ',' or ')', found "("
Date: Tue, 21 Mar 2023 15:24:42 +0800	[thread overview]
Message-ID: <202303211534.FXXTYfTR-lkp@intel.com> (raw)

tree:   https://github.com/jimc/linux.git maph
head:   d23ecc1b5bd07a90e9bea919ecf2c1b8e5182593
commit: d23ecc1b5bd07a90e9bea919ecf2c1b8e5182593 [1/1] include/linux/map.h: add new header, test it with test_map_h.c (RFC)
config: alpha-randconfig-r011-20230319 (https://download.01.org/0day-ci/archive/20230321/202303211534.FXXTYfTR-lkp@intel.com/config)
compiler: alpha-linux-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://github.com/jimc/linux/commit/d23ecc1b5bd07a90e9bea919ecf2c1b8e5182593
        git remote add jimc https://github.com/jimc/linux.git
        git fetch --no-tags jimc maph
        git checkout d23ecc1b5bd07a90e9bea919ecf2c1b8e5182593
        # 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=alpha olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=alpha SHELL=/bin/bash lib/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303211534.FXXTYfTR-lkp@intel.com/

All errors (new ones prefixed by >>):

>> lib/test_map_h.c:25:39: error: expected ',' or ')', found "("
      25 |   #define BUILD_BUG_STREQ(BUILD_BUG_ON(0))
         |                                       ^
   lib/test_map_h.c: In function 'MAPH_BUILD_BUG':
>> lib/test_map_h.c:37:9: error: implicit declaration of function 'BUILD_BUG_STREQ'; did you mean 'BUILD_BUG_ON'? [-Werror=implicit-function-declaration]
      37 |         BUILD_BUG_STREQ(debug_cats, 0, "DRMx_CORE");
         |         ^~~~~~~~~~~~~~~
         |         BUILD_BUG_ON
>> lib/test_map_h.c:37:25: error: 'debug_cats' undeclared (first use in this function)
      37 |         BUILD_BUG_STREQ(debug_cats, 0, "DRMx_CORE");
         |                         ^~~~~~~~~~
   lib/test_map_h.c:37:25: note: each undeclared identifier is reported only once for each function it appears in
   cc1: some warnings being treated as errors


vim +25 lib/test_map_h.c

    22	
    23	/* ARCH=i386 has compile-time errs from this otherwize */
    24	#if !defined(__i386__)
  > 25	  #define BUILD_BUG_STREQ(BUILD_BUG_ON(0))
    26	#else
    27	/* test 2 ways, for now */
    28	#define BUILD_BUG_STREQ(_var, idx, ref) do {				\
    29			BUILD_BUG_ON(__builtin_memcmp(_var##_slist[idx], ref, sizeof(ref))); \
    30			BUILD_BUG_ON(__builtin_memcmp(_var##_slist[idx], ref, __builtin_strlen(ref))); \
    31		} while (0)
    32	#endif
    33	
    34	/* force compile, though its not called */
    35	static void __used MAPH_BUILD_BUG(void)
    36	{
  > 37		BUILD_BUG_STREQ(debug_cats, 0, "DRMx_CORE");
    38		BUILD_BUG_STREQ(debug_cats, 1, "DRMx_DRIVER");
    39		BUILD_BUG_STREQ(debug_cats, 2, "DRMx_KMS");
    40	#ifdef FORCE_FAIL
    41		/* properly breaks compile */
    42		BUILD_BUG_STREQ(debug_cats, 1, "'not-in-map'");
    43	#endif
    44	}
    45	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

                 reply	other threads:[~2023-03-21  7:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202303211534.FXXTYfTR-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jim.cromie@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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.