drivers/pinctrl/cirrus/pinctrl-lochnagar.c:52:46: error: pasting "LOCHNAGAR1_" and "(" does not give a valid preprocessing token

From: kernel test robot
Date: Mon Feb 08 2021 - 21:29:47 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 61556703b610a104de324e4f061dc6cf7b218b46
commit: 0548448b719ac78fa18fdbcd03856952ba6cc7dc pinctrl: lochnagar: Add support for the Cirrus Logic Lochnagar
date: 1 year, 10 months ago
config: mips-randconfig-r012-20210209 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 9.3.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=0548448b719ac78fa18fdbcd03856952ba6cc7dc
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 0548448b719ac78fa18fdbcd03856952ba6cc7dc
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> drivers/pinctrl/cirrus/pinctrl-lochnagar.c:52:46: error: pasting "LOCHNAGAR1_" and "(" does not give a valid preprocessing token
52 | .name = NAME, .type = LN_PTYPE_GPIO, .reg = LOCHNAGAR##REV##_##REG, \
| ^~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:67:2: note: in expansion of macro 'LN_PIN_GPIO'
67 | LN_PIN_GPIO(1, ID, NAME, REG, SHIFT, INVERT)
| ^~~~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:200:1: note: in expansion of macro 'LN1_PIN_GPIO'
200 | LN1_PIN_GPIO(CDC_RESET, "codec-reset", RST, CDC_RESET, 1);
| ^~~~~~~~~~~~
>> drivers/pinctrl/cirrus/pinctrl-lochnagar.c:52:46: error: implicit declaration of function 'LOCHNAGAR1_'; did you mean 'LOCHNAGAR1_RST'? [-Werror=implicit-function-declaration]
52 | .name = NAME, .type = LN_PTYPE_GPIO, .reg = LOCHNAGAR##REV##_##REG, \
| ^~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:67:2: note: in expansion of macro 'LN_PIN_GPIO'
67 | LN_PIN_GPIO(1, ID, NAME, REG, SHIFT, INVERT)
| ^~~~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:200:1: note: in expansion of macro 'LN1_PIN_GPIO'
200 | LN1_PIN_GPIO(CDC_RESET, "codec-reset", RST, CDC_RESET, 1);
| ^~~~~~~~~~~~
>> drivers/pinctrl/cirrus/pinctrl-lochnagar.c:52:46: error: initializer element is not constant
52 | .name = NAME, .type = LN_PTYPE_GPIO, .reg = LOCHNAGAR##REV##_##REG, \
| ^~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:67:2: note: in expansion of macro 'LN_PIN_GPIO'
67 | LN_PIN_GPIO(1, ID, NAME, REG, SHIFT, INVERT)
| ^~~~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:200:1: note: in expansion of macro 'LN1_PIN_GPIO'
200 | LN1_PIN_GPIO(CDC_RESET, "codec-reset", RST, CDC_RESET, 1);
| ^~~~~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:52:46: note: (near initialization for 'lochnagar1_CDC_RESET_pin.reg')
52 | .name = NAME, .type = LN_PTYPE_GPIO, .reg = LOCHNAGAR##REV##_##REG, \
| ^~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:67:2: note: in expansion of macro 'LN_PIN_GPIO'
67 | LN_PIN_GPIO(1, ID, NAME, REG, SHIFT, INVERT)
| ^~~~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:200:1: note: in expansion of macro 'LN1_PIN_GPIO'
200 | LN1_PIN_GPIO(CDC_RESET, "codec-reset", RST, CDC_RESET, 1);
| ^~~~~~~~~~~~
>> drivers/pinctrl/cirrus/pinctrl-lochnagar.c:52:46: error: pasting "LOCHNAGAR1_" and "(" does not give a valid preprocessing token
52 | .name = NAME, .type = LN_PTYPE_GPIO, .reg = LOCHNAGAR##REV##_##REG, \
| ^~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:67:2: note: in expansion of macro 'LN_PIN_GPIO'
67 | LN_PIN_GPIO(1, ID, NAME, REG, SHIFT, INVERT)
| ^~~~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:201:1: note: in expansion of macro 'LN1_PIN_GPIO'
201 | LN1_PIN_GPIO(DSP_RESET, "dsp-reset", RST, DSP_RESET, 1);
| ^~~~~~~~~~~~
>> drivers/pinctrl/cirrus/pinctrl-lochnagar.c:52:46: error: initializer element is not constant
52 | .name = NAME, .type = LN_PTYPE_GPIO, .reg = LOCHNAGAR##REV##_##REG, \
| ^~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:67:2: note: in expansion of macro 'LN_PIN_GPIO'
67 | LN_PIN_GPIO(1, ID, NAME, REG, SHIFT, INVERT)
| ^~~~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:201:1: note: in expansion of macro 'LN1_PIN_GPIO'
201 | LN1_PIN_GPIO(DSP_RESET, "dsp-reset", RST, DSP_RESET, 1);
| ^~~~~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:52:46: note: (near initialization for 'lochnagar1_DSP_RESET_pin.reg')
52 | .name = NAME, .type = LN_PTYPE_GPIO, .reg = LOCHNAGAR##REV##_##REG, \
| ^~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:67:2: note: in expansion of macro 'LN_PIN_GPIO'
67 | LN_PIN_GPIO(1, ID, NAME, REG, SHIFT, INVERT)
| ^~~~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:201:1: note: in expansion of macro 'LN1_PIN_GPIO'
201 | LN1_PIN_GPIO(DSP_RESET, "dsp-reset", RST, DSP_RESET, 1);
| ^~~~~~~~~~~~
cc1: some warnings being treated as errors


vim +52 drivers/pinctrl/cirrus/pinctrl-lochnagar.c

49
50 #define LN_PIN_GPIO(REV, ID, NAME, REG, SHIFT, INVERT) \
51 static const struct lochnagar_pin lochnagar##REV##_##ID##_pin = { \
> 52 .name = NAME, .type = LN_PTYPE_GPIO, .reg = LOCHNAGAR##REV##_##REG, \
53 .shift = LOCHNAGAR##REV##_##SHIFT##_SHIFT, .invert = INVERT, \
54 }
55

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip