From: Sergio Paracuellos <sergio.paracuellos@gmail.com>
To: kernel test robot <lkp@intel.com>
Cc: kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>,
Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [linux-next:master 6546/14055] arch/mips/include/asm/mach-ralink/rt305x.h:18:23: error: 'RT305X_SOC_RT3050' undeclared
Date: Tue, 29 Jun 2021 16:57:25 +0200 [thread overview]
Message-ID: <CAMhs-H9+Yty7M8h1A8HwJPMdCeSOTS=x9FEqqcio8iVgJfw-zg@mail.gmail.com> (raw)
In-Reply-To: <CAMhs-H-vHpXd3Fps0ESAyO2=C6yCOJMwhceWX=0Q-0hpVD7VgA@mail.gmail.com>
On Tue, Jun 29, 2021 at 4:16 PM Sergio Paracuellos
<sergio.paracuellos@gmail.com> wrote:
>
> Hi,
>
> On Tue, Jun 29, 2021 at 3:10 PM kernel test robot <lkp@intel.com> wrote:
> >
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head: 73748627df83aab934c81332ca83a44ab8c7b3e3
> > commit: 3a1b0ca5a83b69f95ab9641ae0e77526a6fee384 [6546/14055] pinctrl: ralink: move RT305X SoC pinmux config into a new 'pinctrl-rt305x.c' file
> > config: mips-randconfig-c003-20210629 (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/next/linux-next.git/commit/?id=3a1b0ca5a83b69f95ab9641ae0e77526a6fee384
> > git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> > git fetch --no-tags linux-next master
> > git checkout 3a1b0ca5a83b69f95ab9641ae0e77526a6fee384
> > # save the attached .config to linux build tree
> > mkdir build_dir
> > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 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 >>):
> >
> > In file included from drivers/pinctrl/ralink/pinctrl-rt305x.c:3:
> > arch/mips/include/asm/mach-ralink/rt305x.h: In function 'soc_is_rt3050':
> > >> arch/mips/include/asm/mach-ralink/rt305x.h:18:23: error: 'RT305X_SOC_RT3050' undeclared (first use in this function)
> > 18 | return ralink_soc == RT305X_SOC_RT3050;
> > | ^~~~~~~~~~~~~~~~~
> > arch/mips/include/asm/mach-ralink/rt305x.h:18:23: note: each undeclared identifier is reported only once for each function it appears in
> > >> arch/mips/include/asm/mach-ralink/rt305x.h:18:2: error: 'ralink_soc' has an incomplete type 'enum ralink_soc_type'
> > 18 | return ralink_soc == RT305X_SOC_RT3050;
> > | ^~~~~~
> > arch/mips/include/asm/mach-ralink/rt305x.h: In function 'soc_is_rt3052':
> > >> arch/mips/include/asm/mach-ralink/rt305x.h:23:23: error: 'RT305X_SOC_RT3052' undeclared (first use in this function)
> > 23 | return ralink_soc == RT305X_SOC_RT3052;
> > | ^~~~~~~~~~~~~~~~~
> > arch/mips/include/asm/mach-ralink/rt305x.h:23:2: error: 'ralink_soc' has an incomplete type 'enum ralink_soc_type'
> > 23 | return ralink_soc == RT305X_SOC_RT3052;
> > | ^~~~~~
> > arch/mips/include/asm/mach-ralink/rt305x.h: In function 'soc_is_rt3350':
> > >> arch/mips/include/asm/mach-ralink/rt305x.h:33:23: error: 'RT305X_SOC_RT3350' undeclared (first use in this function)
> > 33 | return ralink_soc == RT305X_SOC_RT3350;
> > | ^~~~~~~~~~~~~~~~~
> > arch/mips/include/asm/mach-ralink/rt305x.h:33:2: error: 'ralink_soc' has an incomplete type 'enum ralink_soc_type'
> > 33 | return ralink_soc == RT305X_SOC_RT3350;
> > | ^~~~~~
> > arch/mips/include/asm/mach-ralink/rt305x.h: In function 'soc_is_rt3352':
> > >> arch/mips/include/asm/mach-ralink/rt305x.h:38:23: error: 'RT305X_SOC_RT3352' undeclared (first use in this function)
> > 38 | return ralink_soc == RT305X_SOC_RT3352;
> > | ^~~~~~~~~~~~~~~~~
> > arch/mips/include/asm/mach-ralink/rt305x.h:38:2: error: 'ralink_soc' has an incomplete type 'enum ralink_soc_type'
> > 38 | return ralink_soc == RT305X_SOC_RT3352;
> > | ^~~~~~
> > arch/mips/include/asm/mach-ralink/rt305x.h: In function 'soc_is_rt5350':
> > >> arch/mips/include/asm/mach-ralink/rt305x.h:43:23: error: 'RT305X_SOC_RT5350' undeclared (first use in this function)
> > 43 | return ralink_soc == RT305X_SOC_RT5350;
> > | ^~~~~~~~~~~~~~~~~
> > arch/mips/include/asm/mach-ralink/rt305x.h:43:2: error: 'ralink_soc' has an incomplete type 'enum ralink_soc_type'
> > 43 | return ralink_soc == RT305X_SOC_RT5350;
> > | ^~~~~~
> > In file included from drivers/pinctrl/ralink/pinctrl-rt305x.c:3:
> > arch/mips/include/asm/mach-ralink/rt305x.h:44:1: error: control reaches end of non-void function [-Werror=return-type]
> > 44 | }
> > | ^
> > arch/mips/include/asm/mach-ralink/rt305x.h: In function 'soc_is_rt3050':
> > arch/mips/include/asm/mach-ralink/rt305x.h:19:1: error: control reaches end of non-void function [-Werror=return-type]
> > 19 | }
> > | ^
> > arch/mips/include/asm/mach-ralink/rt305x.h: In function 'soc_is_rt3052':
> > arch/mips/include/asm/mach-ralink/rt305x.h:24:1: error: control reaches end of non-void function [-Werror=return-type]
> > 24 | }
> > | ^
> > arch/mips/include/asm/mach-ralink/rt305x.h: In function 'soc_is_rt3350':
> > arch/mips/include/asm/mach-ralink/rt305x.h:34:1: error: control reaches end of non-void function [-Werror=return-type]
> > 34 | }
> > | ^
> > arch/mips/include/asm/mach-ralink/rt305x.h: In function 'soc_is_rt3352':
> > arch/mips/include/asm/mach-ralink/rt305x.h:39:1: error: control reaches end of non-void function [-Werror=return-type]
> > 39 | }
> > | ^
> > cc1: some warnings being treated as errors
>
> There is a missing include after creating the file
> 'drivers/pinctrl/ralink/pinctrl-rt305x.c': #include
> <asm/mach-ralink/ralink_regs.h>
>
> Previous to this move, 'arch/mips/ralink/rt305x.c' was including
> '<asm/mach-ralink/rt305x.h>' and before this include in
> the same C file '<asm/mach-ralink/ralink_regs.h>' is being included. I
> don't know why this is being including in C file and not
> in the header itself. So to be coherent we should add the include
> <asm/mach-ralink/ralink_regs.h> in the new
> 'drivers/pinctrl/ralink/pinctrl-rt305x.c'
> as follows:
>
> diff --git a/drivers/pinctrl/ralink/pinctrl-rt305x.c
> b/drivers/pinctrl/ralink/pinctrl-rt305x.c
> index 699fe18e7000..5d8fa156c003 100644
> --- a/drivers/pinctrl/ralink/pinctrl-rt305x.c
> +++ b/drivers/pinctrl/ralink/pinctrl-rt305x.c
> @@ -1,5 +1,6 @@
> // SPDX-License-Identifier: GPL-2.0-only
>
> +#include <asm/mach-ralink/ralink_regs.h>
> #include <asm/mach-ralink/rt305x.h>
> #include <linux/module.h>
> #include <linux/platform_device.h>
>
> This should fix the problem. Maybe there is a better solution...
> Linus, what do you think?
I have already sent this patch: https://lkml.org/lkml/2021/6/29/414
Linus, let me know if this is ok for you.
Thanks,
Sergio Paracuellos
>
> Best regards,
> Sergio Paracuellos
>
> >
> >
> > vim +/RT305X_SOC_RT3050 +18 arch/mips/include/asm/mach-ralink/rt305x.h
> >
> > 2809b31770d7fd John Crispin 2013-01-20 15
> > 2809b31770d7fd John Crispin 2013-01-20 16 static inline int soc_is_rt3050(void)
> > 2809b31770d7fd John Crispin 2013-01-20 17 {
> > 418d29c8706170 John Crispin 2015-11-04 @18 return ralink_soc == RT305X_SOC_RT3050;
> > 2809b31770d7fd John Crispin 2013-01-20 19 }
> > 2809b31770d7fd John Crispin 2013-01-20 20
> > 2809b31770d7fd John Crispin 2013-01-20 21 static inline int soc_is_rt3052(void)
> > 2809b31770d7fd John Crispin 2013-01-20 22 {
> > 418d29c8706170 John Crispin 2015-11-04 @23 return ralink_soc == RT305X_SOC_RT3052;
> > 2809b31770d7fd John Crispin 2013-01-20 24 }
> > 2809b31770d7fd John Crispin 2013-01-20 25
> > 2809b31770d7fd John Crispin 2013-01-20 26 static inline int soc_is_rt305x(void)
> > 2809b31770d7fd John Crispin 2013-01-20 27 {
> > 2809b31770d7fd John Crispin 2013-01-20 28 return soc_is_rt3050() || soc_is_rt3052();
> > 2809b31770d7fd John Crispin 2013-01-20 29 }
> > 2809b31770d7fd John Crispin 2013-01-20 30
> > 2809b31770d7fd John Crispin 2013-01-20 31 static inline int soc_is_rt3350(void)
> > 2809b31770d7fd John Crispin 2013-01-20 32 {
> > 418d29c8706170 John Crispin 2015-11-04 @33 return ralink_soc == RT305X_SOC_RT3350;
> > 2809b31770d7fd John Crispin 2013-01-20 34 }
> > 2809b31770d7fd John Crispin 2013-01-20 35
> > 2809b31770d7fd John Crispin 2013-01-20 36 static inline int soc_is_rt3352(void)
> > 2809b31770d7fd John Crispin 2013-01-20 37 {
> > 418d29c8706170 John Crispin 2015-11-04 @38 return ralink_soc == RT305X_SOC_RT3352;
> > 2809b31770d7fd John Crispin 2013-01-20 39 }
> > 2809b31770d7fd John Crispin 2013-01-20 40
> > 2809b31770d7fd John Crispin 2013-01-20 41 static inline int soc_is_rt5350(void)
> > 2809b31770d7fd John Crispin 2013-01-20 42 {
> > 418d29c8706170 John Crispin 2015-11-04 @43 return ralink_soc == RT305X_SOC_RT5350;
> > 2809b31770d7fd John Crispin 2013-01-20 44 }
> > 2809b31770d7fd John Crispin 2013-01-20 45
> >
> > :::::: The code at line 18 was first introduced by commit
> > :::::: 418d29c8706170c6801998e48341181b274a47a8 MIPS: ralink: Unify SoC id handling
> >
> > :::::: TO: John Crispin <blogic@openwrt.org>
> > :::::: CC: Ralf Baechle <ralf@linux-mips.org>
> >
> > ---
> > 0-DAY CI Kernel Test Service, Intel Corporation
> > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
prev parent reply other threads:[~2021-06-29 14:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-29 13:10 kernel test robot
2021-06-29 14:16 ` Sergio Paracuellos
2021-06-29 14:57 ` Sergio Paracuellos [this message]
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='CAMhs-H9+Yty7M8h1A8HwJPMdCeSOTS=x9FEqqcio8iVgJfw-zg@mail.gmail.com' \
--to=sergio.paracuellos@gmail.com \
--cc=kbuild-all@lists.01.org \
--cc=linus.walleij@linaro.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox