* [PATCH] soc: imx: Kconfig: force using OF when COMPILE_TEST @ 2020-06-15 10:21 peng.fan 2020-06-16 2:41 ` Aisheng Dong 2020-06-16 15:59 ` Uwe Kleine-König 0 siblings, 2 replies; 8+ messages in thread From: peng.fan @ 2020-06-15 10:21 UTC (permalink / raw) To: shawnguo, s.hauer, aisheng.dong Cc: Peng Fan, leonard.crestez, linux-arm-kernel, kernel, linux-imx From: Peng Fan <peng.fan@nxp.com> Fix the build warning with x86_64-randconfig >> drivers/soc/imx/soc-imx8m.c:150:34: warning: unused variable >> 'imx8_soc_match' [-Wunused-const-variable] static const struct of_device_id imx8_soc_match[] = { ^ Fixes: fc40200ebf82 ("soc: imx: increase build coverage for imx8m soc driver") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> --- drivers/soc/imx/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/imx/Kconfig b/drivers/soc/imx/Kconfig index d515d2cc20ed..aadf13c9d396 100644 --- a/drivers/soc/imx/Kconfig +++ b/drivers/soc/imx/Kconfig @@ -19,7 +19,7 @@ config IMX_SCU_SOC config SOC_IMX8M bool "i.MX8M SoC family support" - depends on ARCH_MXC || COMPILE_TEST + depends on ARCH_MXC || (COMPILE_TEST && OF) default ARCH_MXC && ARM64 select SOC_BUS help -- 2.16.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 8+ messages in thread
* RE: [PATCH] soc: imx: Kconfig: force using OF when COMPILE_TEST 2020-06-15 10:21 [PATCH] soc: imx: Kconfig: force using OF when COMPILE_TEST peng.fan @ 2020-06-16 2:41 ` Aisheng Dong 2020-06-16 15:59 ` Uwe Kleine-König 1 sibling, 0 replies; 8+ messages in thread From: Aisheng Dong @ 2020-06-16 2:41 UTC (permalink / raw) To: Peng Fan, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: Leonard Crestez, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, dl-linux-imx > From: Peng Fan <peng.fan@nxp.com> > Sent: Monday, June 15, 2020 6:21 PM > > Fix the build warning with x86_64-randconfig > >> drivers/soc/imx/soc-imx8m.c:150:34: warning: unused variable > >> 'imx8_soc_match' [-Wunused-const-variable] > static const struct of_device_id imx8_soc_match[] = { ^ > > Fixes: fc40200ebf82 ("soc: imx: increase build coverage for imx8m soc driver") > Reported-by: kernel test robot <lkp@intel.com> > Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com> Regards Aisheng _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] soc: imx: Kconfig: force using OF when COMPILE_TEST 2020-06-15 10:21 [PATCH] soc: imx: Kconfig: force using OF when COMPILE_TEST peng.fan 2020-06-16 2:41 ` Aisheng Dong @ 2020-06-16 15:59 ` Uwe Kleine-König 2020-06-16 16:40 ` Robin Murphy 1 sibling, 1 reply; 8+ messages in thread From: Uwe Kleine-König @ 2020-06-16 15:59 UTC (permalink / raw) To: peng.fan Cc: aisheng.dong, s.hauer, linux-imx, kernel, leonard.crestez, shawnguo, linux-arm-kernel [-- Attachment #1.1: Type: text/plain, Size: 1360 bytes --] On Mon, Jun 15, 2020 at 06:21:25PM +0800, peng.fan@nxp.com wrote: > From: Peng Fan <peng.fan@nxp.com> > > Fix the build warning with x86_64-randconfig > >> drivers/soc/imx/soc-imx8m.c:150:34: warning: unused variable > >> 'imx8_soc_match' [-Wunused-const-variable] > static const struct of_device_id imx8_soc_match[] = { ^ > > Fixes: fc40200ebf82 ("soc: imx: increase build coverage for imx8m soc driver") > Reported-by: kernel test robot <lkp@intel.com> > Signed-off-by: Peng Fan <peng.fan@nxp.com> > --- > drivers/soc/imx/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/soc/imx/Kconfig b/drivers/soc/imx/Kconfig > index d515d2cc20ed..aadf13c9d396 100644 > --- a/drivers/soc/imx/Kconfig > +++ b/drivers/soc/imx/Kconfig > @@ -19,7 +19,7 @@ config IMX_SCU_SOC > > config SOC_IMX8M > bool "i.MX8M SoC family support" > - depends on ARCH_MXC || COMPILE_TEST > + depends on ARCH_MXC || (COMPILE_TEST && OF) A bit prettier (IMHO) would be: config SOC_IMX8M bool "i.MX8M SoC family support" depends on ARCH_MXC || COMPILE_TEST + depends on OF default ARCH_MXC && ARM64 select SOC_BUS help Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ | [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] [-- Attachment #2: Type: text/plain, Size: 176 bytes --] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] soc: imx: Kconfig: force using OF when COMPILE_TEST 2020-06-16 15:59 ` Uwe Kleine-König @ 2020-06-16 16:40 ` Robin Murphy 2020-06-17 2:05 ` Peng Fan 0 siblings, 1 reply; 8+ messages in thread From: Robin Murphy @ 2020-06-16 16:40 UTC (permalink / raw) To: Uwe Kleine-König, peng.fan Cc: aisheng.dong, s.hauer, linux-imx, kernel, leonard.crestez, shawnguo, linux-arm-kernel On 2020-06-16 16:59, Uwe Kleine-König wrote: > On Mon, Jun 15, 2020 at 06:21:25PM +0800, peng.fan@nxp.com wrote: >> From: Peng Fan <peng.fan@nxp.com> >> >> Fix the build warning with x86_64-randconfig >>>> drivers/soc/imx/soc-imx8m.c:150:34: warning: unused variable >>>> 'imx8_soc_match' [-Wunused-const-variable] >> static const struct of_device_id imx8_soc_match[] = { ^ >> >> Fixes: fc40200ebf82 ("soc: imx: increase build coverage for imx8m soc driver") >> Reported-by: kernel test robot <lkp@intel.com> >> Signed-off-by: Peng Fan <peng.fan@nxp.com> >> --- >> drivers/soc/imx/Kconfig | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/soc/imx/Kconfig b/drivers/soc/imx/Kconfig >> index d515d2cc20ed..aadf13c9d396 100644 >> --- a/drivers/soc/imx/Kconfig >> +++ b/drivers/soc/imx/Kconfig >> @@ -19,7 +19,7 @@ config IMX_SCU_SOC >> >> config SOC_IMX8M >> bool "i.MX8M SoC family support" >> - depends on ARCH_MXC || COMPILE_TEST >> + depends on ARCH_MXC || (COMPILE_TEST && OF) > > A bit prettier (IMHO) would be: > > config SOC_IMX8M > bool "i.MX8M SoC family support" > depends on ARCH_MXC || COMPILE_TEST > + depends on OF > default ARCH_MXC && ARM64 > select SOC_BUS > help That's not just prettier, it's logically correct. If some code needs OF to build correctly, then it depends on OF, regardless of *why* it's being built at any given time. That said, if the only issue in this particular case is the warning above, then it's hardly a real dependency; simply marking the of_device_id data as __maybe_unused (like various other drivers do) should suffice. Limiting COMPILE_TEST coverage instead of actually fixing simple issues that it exposes seems a bit backwards... Robin. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] soc: imx: Kconfig: force using OF when COMPILE_TEST 2020-06-16 16:40 ` Robin Murphy @ 2020-06-17 2:05 ` Peng Fan 2020-06-17 6:05 ` Uwe Kleine-König 0 siblings, 1 reply; 8+ messages in thread From: Peng Fan @ 2020-06-17 2:05 UTC (permalink / raw) To: Robin Murphy, Uwe Kleine-König Cc: Aisheng Dong, s.hauer@pengutronix.de, dl-linux-imx, kernel@pengutronix.de, Leonard Crestez, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org > Subject: Re: [PATCH] soc: imx: Kconfig: force using OF when COMPILE_TEST > > On 2020-06-16 16:59, Uwe Kleine-König wrote: > > On Mon, Jun 15, 2020 at 06:21:25PM +0800, peng.fan@nxp.com wrote: > >> From: Peng Fan <peng.fan@nxp.com> > >> > >> Fix the build warning with x86_64-randconfig > >>>> drivers/soc/imx/soc-imx8m.c:150:34: warning: unused variable > >>>> 'imx8_soc_match' [-Wunused-const-variable] > >> static const struct of_device_id imx8_soc_match[] = { ^ > >> > >> Fixes: fc40200ebf82 ("soc: imx: increase build coverage for imx8m soc > >> driver") > >> Reported-by: kernel test robot <lkp@intel.com> > >> Signed-off-by: Peng Fan <peng.fan@nxp.com> > >> --- > >> drivers/soc/imx/Kconfig | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/drivers/soc/imx/Kconfig b/drivers/soc/imx/Kconfig index > >> d515d2cc20ed..aadf13c9d396 100644 > >> --- a/drivers/soc/imx/Kconfig > >> +++ b/drivers/soc/imx/Kconfig > >> @@ -19,7 +19,7 @@ config IMX_SCU_SOC > >> > >> config SOC_IMX8M > >> bool "i.MX8M SoC family support" > >> - depends on ARCH_MXC || COMPILE_TEST > >> + depends on ARCH_MXC || (COMPILE_TEST && OF) > > > > A bit prettier (IMHO) would be: > > > > config SOC_IMX8M > > bool "i.MX8M SoC family support" > > depends on ARCH_MXC || COMPILE_TEST > > + depends on OF > > default ARCH_MXC && ARM64 > > select SOC_BUS > > help > > That's not just prettier, it's logically correct. If some code needs OF to build > correctly, then it depends on OF, regardless of *why* it's being built at any > given time. > > That said, if the only issue in this particular case is the warning above, then it's > hardly a real dependency; simply marking the of_device_id data as > __maybe_unused (like various other drivers do) should suffice. Limiting > COMPILE_TEST coverage instead of actually fixing simple issues that it > exposes seems a bit backwards... ok, I'll use __maybe_unused in v2, but it actually not make sense to compile this file for x86_64. Thanks, Peng. > > Robin. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] soc: imx: Kconfig: force using OF when COMPILE_TEST 2020-06-17 2:05 ` Peng Fan @ 2020-06-17 6:05 ` Uwe Kleine-König 2020-06-24 1:54 ` Peng Fan 0 siblings, 1 reply; 8+ messages in thread From: Uwe Kleine-König @ 2020-06-17 6:05 UTC (permalink / raw) To: Peng Fan Cc: Aisheng Dong, shawnguo@kernel.org, s.hauer@pengutronix.de, dl-linux-imx, kernel@pengutronix.de, Leonard Crestez, Robin Murphy, linux-arm-kernel@lists.infradead.org [-- Attachment #1.1: Type: text/plain, Size: 2710 bytes --] On Wed, Jun 17, 2020 at 02:05:33AM +0000, Peng Fan wrote: > > Subject: Re: [PATCH] soc: imx: Kconfig: force using OF when COMPILE_TEST > > > > On 2020-06-16 16:59, Uwe Kleine-König wrote: > > > On Mon, Jun 15, 2020 at 06:21:25PM +0800, peng.fan@nxp.com wrote: > > >> From: Peng Fan <peng.fan@nxp.com> > > >> > > >> Fix the build warning with x86_64-randconfig > > >>>> drivers/soc/imx/soc-imx8m.c:150:34: warning: unused variable > > >>>> 'imx8_soc_match' [-Wunused-const-variable] > > >> static const struct of_device_id imx8_soc_match[] = { ^ > > >> > > >> Fixes: fc40200ebf82 ("soc: imx: increase build coverage for imx8m soc > > >> driver") > > >> Reported-by: kernel test robot <lkp@intel.com> > > >> Signed-off-by: Peng Fan <peng.fan@nxp.com> > > >> --- > > >> drivers/soc/imx/Kconfig | 2 +- > > >> 1 file changed, 1 insertion(+), 1 deletion(-) > > >> > > >> diff --git a/drivers/soc/imx/Kconfig b/drivers/soc/imx/Kconfig index > > >> d515d2cc20ed..aadf13c9d396 100644 > > >> --- a/drivers/soc/imx/Kconfig > > >> +++ b/drivers/soc/imx/Kconfig > > >> @@ -19,7 +19,7 @@ config IMX_SCU_SOC > > >> > > >> config SOC_IMX8M > > >> bool "i.MX8M SoC family support" > > >> - depends on ARCH_MXC || COMPILE_TEST > > >> + depends on ARCH_MXC || (COMPILE_TEST && OF) > > > > > > A bit prettier (IMHO) would be: > > > > > > config SOC_IMX8M > > > bool "i.MX8M SoC family support" > > > depends on ARCH_MXC || COMPILE_TEST > > > + depends on OF > > > default ARCH_MXC && ARM64 > > > select SOC_BUS > > > help > > > > That's not just prettier, it's logically correct. If some code needs OF to build > > correctly, then it depends on OF, regardless of *why* it's being built at any > > given time. > > > > That said, if the only issue in this particular case is the warning above, then it's > > hardly a real dependency; simply marking the of_device_id data as > > __maybe_unused (like various other drivers do) should suffice. Limiting > > COMPILE_TEST coverage instead of actually fixing simple issues that it > > exposes seems a bit backwards... > > ok, I'll use __maybe_unused in v2, but it actually not make sense to compile > this file for x86_64. This is wrong in a subtle way. It makes sense to compile the driver on x86_64 (and other archs) for QA reasons. It doesn't make sense to use a kernel on an x86 machine with this driver enabled. That's why we have COMPILE_TEST which you disable if you want to create a kernel to actually run it. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ | [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] [-- Attachment #2: Type: text/plain, Size: 176 bytes --] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] soc: imx: Kconfig: force using OF when COMPILE_TEST 2020-06-17 6:05 ` Uwe Kleine-König @ 2020-06-24 1:54 ` Peng Fan 2020-06-24 3:27 ` Shawn Guo 0 siblings, 1 reply; 8+ messages in thread From: Peng Fan @ 2020-06-24 1:54 UTC (permalink / raw) To: Uwe Kleine-König Cc: Aisheng Dong, shawnguo@kernel.org, s.hauer@pengutronix.de, dl-linux-imx, kernel@pengutronix.de, Leonard Crestez, Robin Murphy, linux-arm-kernel@lists.infradead.org > Subject: Re: [PATCH] soc: imx: Kconfig: force using OF when COMPILE_TEST > > On Wed, Jun 17, 2020 at 02:05:33AM +0000, Peng Fan wrote: > > > Subject: Re: [PATCH] soc: imx: Kconfig: force using OF when > > > COMPILE_TEST > > > > > > On 2020-06-16 16:59, Uwe Kleine-König wrote: > > > > On Mon, Jun 15, 2020 at 06:21:25PM +0800, peng.fan@nxp.com wrote: > > > >> From: Peng Fan <peng.fan@nxp.com> > > > >> > > > >> Fix the build warning with x86_64-randconfig > > > >>>> drivers/soc/imx/soc-imx8m.c:150:34: warning: unused variable > > > >>>> 'imx8_soc_match' [-Wunused-const-variable] > > > >> static const struct of_device_id imx8_soc_match[] = { ^ > > > >> > > > >> Fixes: fc40200ebf82 ("soc: imx: increase build coverage for imx8m > > > >> soc > > > >> driver") > > > >> Reported-by: kernel test robot <lkp@intel.com> > > > >> Signed-off-by: Peng Fan <peng.fan@nxp.com> > > > >> --- > > > >> drivers/soc/imx/Kconfig | 2 +- > > > >> 1 file changed, 1 insertion(+), 1 deletion(-) > > > >> > > > >> diff --git a/drivers/soc/imx/Kconfig b/drivers/soc/imx/Kconfig > > > >> index > > > >> d515d2cc20ed..aadf13c9d396 100644 > > > >> --- a/drivers/soc/imx/Kconfig > > > >> +++ b/drivers/soc/imx/Kconfig > > > >> @@ -19,7 +19,7 @@ config IMX_SCU_SOC > > > >> > > > >> config SOC_IMX8M > > > >> bool "i.MX8M SoC family support" > > > >> - depends on ARCH_MXC || COMPILE_TEST > > > >> + depends on ARCH_MXC || (COMPILE_TEST && OF) > > > > > > > > A bit prettier (IMHO) would be: > > > > > > > > config SOC_IMX8M > > > > bool "i.MX8M SoC family support" > > > > depends on ARCH_MXC || COMPILE_TEST > > > > + depends on OF > > > > default ARCH_MXC && ARM64 > > > > select SOC_BUS > > > > help > > > > > > That's not just prettier, it's logically correct. If some code needs > > > OF to build correctly, then it depends on OF, regardless of *why* > > > it's being built at any given time. > > > > > > That said, if the only issue in this particular case is the warning > > > above, then it's hardly a real dependency; simply marking the > > > of_device_id data as __maybe_unused (like various other drivers do) > > > should suffice. Limiting COMPILE_TEST coverage instead of actually > > > fixing simple issues that it exposes seems a bit backwards... > > > > ok, I'll use __maybe_unused in v2, but it actually not make sense to > > compile this file for x86_64. > > This is wrong in a subtle way. It makes sense to compile the driver on > x86_64 (and other archs) for QA reasons. It doesn't make sense to use a > kernel on an x86 machine with this driver enabled. That's why we have > COMPILE_TEST which you disable if you want to create a kernel to actually > run it. Shawn, What's your idea? I am not very clear on which path to go. Thanks, Peng. > > Best regards > Uwe > > > -- > Pengutronix e.K. | Uwe Kleine-König > | > Industrial Linux Solutions | https://www.pengutronix.de/ > | _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] soc: imx: Kconfig: force using OF when COMPILE_TEST 2020-06-24 1:54 ` Peng Fan @ 2020-06-24 3:27 ` Shawn Guo 0 siblings, 0 replies; 8+ messages in thread From: Shawn Guo @ 2020-06-24 3:27 UTC (permalink / raw) To: Peng Fan Cc: Aisheng Dong, s.hauer@pengutronix.de, dl-linux-imx, kernel@pengutronix.de, Uwe Kleine-König, Leonard Crestez, Robin Murphy, linux-arm-kernel@lists.infradead.org On Wed, Jun 24, 2020 at 01:54:42AM +0000, Peng Fan wrote: > > > ok, I'll use __maybe_unused in v2, but it actually not make sense to > > > compile this file for x86_64. > > > > This is wrong in a subtle way. It makes sense to compile the driver on > > x86_64 (and other archs) for QA reasons. It doesn't make sense to use a > > kernel on an x86 machine with this driver enabled. That's why we have > > COMPILE_TEST which you disable if you want to create a kernel to actually > > run it. > > Shawn, > > What's your idea? I am not very clear on which path to go. I think we agreed on __maybe_unused. What Uwe was questioning is the second part of your statement - "it actually not make sense to compile this file for x86_64." Shawn _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-06-24 3:30 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-06-15 10:21 [PATCH] soc: imx: Kconfig: force using OF when COMPILE_TEST peng.fan 2020-06-16 2:41 ` Aisheng Dong 2020-06-16 15:59 ` Uwe Kleine-König 2020-06-16 16:40 ` Robin Murphy 2020-06-17 2:05 ` Peng Fan 2020-06-17 6:05 ` Uwe Kleine-König 2020-06-24 1:54 ` Peng Fan 2020-06-24 3:27 ` Shawn Guo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).