* drivers/pinctrl/cirrus/pinctrl-lochnagar.c:200:1: error: implicit declaration of function 'LOCHNAGAR1_' is invalid in C99
@ 2022-04-08 10:02 kernel test robot
2022-04-08 12:45 ` Arnd Bergmann
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2022-04-08 10:02 UTC (permalink / raw)
To: Arnd Bergmann
Cc: llvm, kbuild-all, linux-kernel, Masahiro Yamada, Alex Shi,
Nick Desaulniers, Miguel Ojeda, Nathan Chancellor
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 42e7a03d3badebd4e70aea5362d6914dfc7c220b
commit: e8c07082a810fbb9db303a2b66b66b8d7e588b53 Kbuild: move to -std=gnu11
date: 4 weeks ago
config: mips-randconfig-r023-20220408 (https://download.01.org/0day-ci/archive/20220408/202204081729.f4cgbHob-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 6b306233f78876a1d197ed6e1f05785505de7c63)
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
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e8c07082a810fbb9db303a2b66b66b8d7e588b53
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout e8c07082a810fbb9db303a2b66b66b8d7e588b53
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips 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 >>):
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:200:1: error: pasting formed 'LOCHNAGAR1_(', an invalid preprocessing token
LN1_PIN_GPIO(CDC_RESET, "codec-reset", RST, CDC_RESET, 1);
^
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:67:2: note: expanded from macro 'LN1_PIN_GPIO'
LN_PIN_GPIO(1, ID, NAME, REG, SHIFT, INVERT)
^
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:52:63: note: expanded from macro 'LN_PIN_GPIO'
.name = NAME, .type = LN_PTYPE_GPIO, .reg = LOCHNAGAR##REV##_##REG, \
^
>> drivers/pinctrl/cirrus/pinctrl-lochnagar.c:200:1: error: implicit declaration of function 'LOCHNAGAR1_' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:67:2: note: expanded from macro 'LN1_PIN_GPIO'
LN_PIN_GPIO(1, ID, NAME, REG, SHIFT, INVERT)
^
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:52:46: note: expanded from macro 'LN_PIN_GPIO'
.name = NAME, .type = LN_PTYPE_GPIO, .reg = LOCHNAGAR##REV##_##REG, \
^
<scratch space>:188:1: note: expanded from here
LOCHNAGAR1_
^
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:200:1: error: initializer element is not a compile-time constant
LN1_PIN_GPIO(CDC_RESET, "codec-reset", RST, CDC_RESET, 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:67:2: note: expanded from macro 'LN1_PIN_GPIO'
LN_PIN_GPIO(1, ID, NAME, REG, SHIFT, INVERT)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:52:46: note: expanded from macro 'LN_PIN_GPIO'
.name = NAME, .type = LN_PTYPE_GPIO, .reg = LOCHNAGAR##REV##_##REG, \
^~~~~~~~~~~~~~~~~~~~~~
<scratch space>:188:1: note: expanded from here
LOCHNAGAR1_
^
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:201:1: error: pasting formed 'LOCHNAGAR1_(', an invalid preprocessing token
LN1_PIN_GPIO(DSP_RESET, "dsp-reset", RST, DSP_RESET, 1);
^
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:67:2: note: expanded from macro 'LN1_PIN_GPIO'
LN_PIN_GPIO(1, ID, NAME, REG, SHIFT, INVERT)
^
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:52:63: note: expanded from macro 'LN_PIN_GPIO'
.name = NAME, .type = LN_PTYPE_GPIO, .reg = LOCHNAGAR##REV##_##REG, \
^
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:201:1: error: initializer element is not a compile-time constant
LN1_PIN_GPIO(DSP_RESET, "dsp-reset", RST, DSP_RESET, 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:67:2: note: expanded from macro 'LN1_PIN_GPIO'
LN_PIN_GPIO(1, ID, NAME, REG, SHIFT, INVERT)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:52:46: note: expanded from macro 'LN_PIN_GPIO'
.name = NAME, .type = LN_PTYPE_GPIO, .reg = LOCHNAGAR##REV##_##REG, \
^~~~~~~~~~~~~~~~~~~~~~
<scratch space>:199:1: note: expanded from here
LOCHNAGAR1_
^
5 errors generated.
vim +/LOCHNAGAR1_ +200 drivers/pinctrl/cirrus/pinctrl-lochnagar.c
0548448b719ac7 Charles Keepax 2019-03-19 199
0548448b719ac7 Charles Keepax 2019-03-19 @200 LN1_PIN_GPIO(CDC_RESET, "codec-reset", RST, CDC_RESET, 1);
0548448b719ac7 Charles Keepax 2019-03-19 201 LN1_PIN_GPIO(DSP_RESET, "dsp-reset", RST, DSP_RESET, 1);
0548448b719ac7 Charles Keepax 2019-03-19 202 LN1_PIN_GPIO(CDC_CIF1MODE, "codec-cif1mode", I2C_CTRL, CDC_CIF_MODE, 0);
0548448b719ac7 Charles Keepax 2019-03-19 203 LN1_PIN_MUX(GF_GPIO2, "gf-gpio2");
0548448b719ac7 Charles Keepax 2019-03-19 204 LN1_PIN_MUX(GF_GPIO3, "gf-gpio3");
0548448b719ac7 Charles Keepax 2019-03-19 205 LN1_PIN_MUX(GF_GPIO7, "gf-gpio7");
0548448b719ac7 Charles Keepax 2019-03-19 206 LN1_PIN_MUX(LED1, "led1");
0548448b719ac7 Charles Keepax 2019-03-19 207 LN1_PIN_MUX(LED2, "led2");
0548448b719ac7 Charles Keepax 2019-03-19 208 LN1_PIN_AIF(CDC_AIF1);
0548448b719ac7 Charles Keepax 2019-03-19 209 LN1_PIN_AIF(CDC_AIF2);
0548448b719ac7 Charles Keepax 2019-03-19 210 LN1_PIN_AIF(CDC_AIF3);
0548448b719ac7 Charles Keepax 2019-03-19 211 LN1_PIN_AIF(DSP_AIF1);
0548448b719ac7 Charles Keepax 2019-03-19 212 LN1_PIN_AIF(DSP_AIF2);
0548448b719ac7 Charles Keepax 2019-03-19 213 LN1_PIN_AIF(PSIA1);
0548448b719ac7 Charles Keepax 2019-03-19 214 LN1_PIN_AIF(PSIA2);
0548448b719ac7 Charles Keepax 2019-03-19 215 LN1_PIN_AIF(SPDIF_AIF);
0548448b719ac7 Charles Keepax 2019-03-19 216 LN1_PIN_AIF(GF_AIF1);
0548448b719ac7 Charles Keepax 2019-03-19 217 LN1_PIN_AIF(GF_AIF2);
0548448b719ac7 Charles Keepax 2019-03-19 218 LN1_PIN_AIF(GF_AIF3);
0548448b719ac7 Charles Keepax 2019-03-19 219 LN1_PIN_AIF(GF_AIF4);
0548448b719ac7 Charles Keepax 2019-03-19 220
:::::: The code at line 200 was first introduced by commit
:::::: 0548448b719ac78fa18fdbcd03856952ba6cc7dc pinctrl: lochnagar: Add support for the Cirrus Logic Lochnagar
:::::: TO: Charles Keepax <ckeepax@opensource.cirrus.com>
:::::: CC: Linus Walleij <linus.walleij@linaro.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: drivers/pinctrl/cirrus/pinctrl-lochnagar.c:200:1: error: implicit declaration of function 'LOCHNAGAR1_' is invalid in C99
2022-04-08 10:02 drivers/pinctrl/cirrus/pinctrl-lochnagar.c:200:1: error: implicit declaration of function 'LOCHNAGAR1_' is invalid in C99 kernel test robot
@ 2022-04-08 12:45 ` Arnd Bergmann
0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2022-04-08 12:45 UTC (permalink / raw)
To: kernel test robot
Cc: Arnd Bergmann, llvm, kbuild-all, Linux Kernel Mailing List,
Masahiro Yamada, Alex Shi, Nick Desaulniers, Miguel Ojeda,
Nathan Chancellor
On Fri, Apr 8, 2022 at 12:02 PM kernel test robot <lkp@intel.com> wrote:
> All errors (new ones prefixed by >>):
>
> drivers/pinctrl/cirrus/pinctrl-lochnagar.c:200:1: error: pasting formed 'LOCHNAGAR1_(', an invalid preprocessing token
> LN1_PIN_GPIO(CDC_RESET, "codec-reset", RST, CDC_RESET, 1);
> ^
> drivers/pinctrl/cirrus/pinctrl-lochnagar.c:67:2: note: expanded from macro 'LN1_PIN_GPIO'
> LN_PIN_GPIO(1, ID, NAME, REG, SHIFT, INVERT)
> ^
> drivers/pinctrl/cirrus/pinctrl-lochnagar.c:52:63: note: expanded from macro 'LN_PIN_GPIO'
> .name = NAME, .type = LN_PTYPE_GPIO, .reg = LOCHNAGAR##REV##_##REG, \
> ^
> >> drivers/pinctrl/cirrus/pinctrl-lochnagar.c:200:1: error: implicit declaration of function 'LOCHNAGAR1_' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
I have checked this one, and it looks like this is not a regression.
lkp flags it because the error
message changed: with --std=gnu89, the output was
rivers/pinctrl/cirrus/pinctrl-lochnagar.c:200:1: error: implicit
declaration of function 'LOCHNAGAR1_' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
The problem is unrelated to my patch, apparently the global macro named 'RES'
on this platform gets in the way, and removing it fixes the build:
--- a/arch/mips/include/asm/mach-rc32434/rb.h
+++ b/arch/mips/include/asm/mach-rc32434/rb.h
@@ -10,7 +10,6 @@
#define REGBASE 0x18000000
#define IDT434_REG_BASE ((volatile void *) KSEG1ADDR(REGBASE))
#define UART0BASE 0x58000
-#define RST (1 << 15)
#define DEV0BASE 0x010000
#define DEV0MASK 0x010004
#define DEV0C 0x010008
Arnd
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: drivers/pinctrl/cirrus/pinctrl-lochnagar.c:200:1: error: implicit declaration of function 'LOCHNAGAR1_' is invalid in C99
@ 2022-04-08 12:45 ` Arnd Bergmann
0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2022-04-08 12:45 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1808 bytes --]
On Fri, Apr 8, 2022 at 12:02 PM kernel test robot <lkp@intel.com> wrote:
> All errors (new ones prefixed by >>):
>
> drivers/pinctrl/cirrus/pinctrl-lochnagar.c:200:1: error: pasting formed 'LOCHNAGAR1_(', an invalid preprocessing token
> LN1_PIN_GPIO(CDC_RESET, "codec-reset", RST, CDC_RESET, 1);
> ^
> drivers/pinctrl/cirrus/pinctrl-lochnagar.c:67:2: note: expanded from macro 'LN1_PIN_GPIO'
> LN_PIN_GPIO(1, ID, NAME, REG, SHIFT, INVERT)
> ^
> drivers/pinctrl/cirrus/pinctrl-lochnagar.c:52:63: note: expanded from macro 'LN_PIN_GPIO'
> .name = NAME, .type = LN_PTYPE_GPIO, .reg = LOCHNAGAR##REV##_##REG, \
> ^
> >> drivers/pinctrl/cirrus/pinctrl-lochnagar.c:200:1: error: implicit declaration of function 'LOCHNAGAR1_' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
I have checked this one, and it looks like this is not a regression.
lkp flags it because the error
message changed: with --std=gnu89, the output was
rivers/pinctrl/cirrus/pinctrl-lochnagar.c:200:1: error: implicit
declaration of function 'LOCHNAGAR1_' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
The problem is unrelated to my patch, apparently the global macro named 'RES'
on this platform gets in the way, and removing it fixes the build:
--- a/arch/mips/include/asm/mach-rc32434/rb.h
+++ b/arch/mips/include/asm/mach-rc32434/rb.h
@@ -10,7 +10,6 @@
#define REGBASE 0x18000000
#define IDT434_REG_BASE ((volatile void *) KSEG1ADDR(REGBASE))
#define UART0BASE 0x58000
-#define RST (1 << 15)
#define DEV0BASE 0x010000
#define DEV0MASK 0x010004
#define DEV0C 0x010008
Arnd
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-08 12:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-08 10:02 drivers/pinctrl/cirrus/pinctrl-lochnagar.c:200:1: error: implicit declaration of function 'LOCHNAGAR1_' is invalid in C99 kernel test robot
2022-04-08 12:45 ` Arnd Bergmann
2022-04-08 12:45 ` Arnd Bergmann
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.