linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio: tegra: don't auto-enable for COMPILE_TEST
@ 2016-07-06 12:54 Arnd Bergmann
  2016-07-06 13:38 ` Linus Walleij
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2016-07-06 12:54 UTC (permalink / raw)
  To: Linus Walleij, Alexandre Courbot
  Cc: Alexander Stein, Arnd Bergmann, William Breathitt Gray,
	linux-gpio, linux-kernel

I stumbled over a build error with COMPILE_TEST and CONFIG_OF
disabled:

drivers/gpio/gpio-tegra.c: In function 'tegra_gpio_probe':
drivers/gpio/gpio-tegra.c:603:9: error: 'struct gpio_chip' has no member named 'of_node'

The problem is that the newly added GPIO_TEGRA Kconfig symbol
does not have a dependency on CONFIG_OF. However, there is another
problem here as the driver gets enabled unconditionally whenever
COMPILE_TEST is set.

This fixes both problems, by making the symbol user-visible
when COMPILE_TEST is set and default-enabled for ARCH_TEGRA=y.

As a side-effect, it is now possible to compile-test a Tegra
kernel with GPIO support disabled, which is harmless.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 4dd4dd1d2120 ("gpio: tegra: Allow compile test")
---
 drivers/gpio/Kconfig | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 681c2dcd697b..513a3d174706 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -402,9 +402,12 @@ config GPIO_TB10X
 	select OF_GPIO
 
 config GPIO_TEGRA
-	bool
-	default y
+	bool "NVIDIA Tegra GPIO support"
+	default ARCH_TEGRA
 	depends on ARCH_TEGRA || COMPILE_TEST
+	depends on OF
+	help
+	  Say yes here to support GPIO pins on NVIDIA Tegra SoCs.
 
 config GPIO_TS4800
 	tristate "TS-4800 DIO blocks and compatibles"
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] gpio: tegra: don't auto-enable for COMPILE_TEST
  2016-07-06 12:54 [PATCH] gpio: tegra: don't auto-enable for COMPILE_TEST Arnd Bergmann
@ 2016-07-06 13:38 ` Linus Walleij
  2016-07-20 10:41   ` Ingo Molnar
  0 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2016-07-06 13:38 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Alexandre Courbot, Alexander Stein, William Breathitt Gray,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org

On Wed, Jul 6, 2016 at 2:54 PM, Arnd Bergmann <arnd@arndb.de> wrote:

> I stumbled over a build error with COMPILE_TEST and CONFIG_OF
> disabled:
>
> drivers/gpio/gpio-tegra.c: In function 'tegra_gpio_probe':
> drivers/gpio/gpio-tegra.c:603:9: error: 'struct gpio_chip' has no member named 'of_node'
>
> The problem is that the newly added GPIO_TEGRA Kconfig symbol
> does not have a dependency on CONFIG_OF. However, there is another
> problem here as the driver gets enabled unconditionally whenever
> COMPILE_TEST is set.
>
> This fixes both problems, by making the symbol user-visible
> when COMPILE_TEST is set and default-enabled for ARCH_TEGRA=y.
>
> As a side-effect, it is now possible to compile-test a Tegra
> kernel with GPIO support disabled, which is harmless.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 4dd4dd1d2120 ("gpio: tegra: Allow compile test")

Patch applied.

I'm starting to get a bit tired about anything related to compile testing.

It's not like I don't understand that it is good to test-build things ...

It's just that enabling this turns up so many strange compile bugs to
the left and right that it takes focus away from core development.
I don't know what can be done to alleviate the situation.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gpio: tegra: don't auto-enable for COMPILE_TEST
  2016-07-06 13:38 ` Linus Walleij
@ 2016-07-20 10:41   ` Ingo Molnar
  2016-07-20 11:07     ` Arnd Bergmann
  2016-07-22 13:39     ` Linus Walleij
  0 siblings, 2 replies; 5+ messages in thread
From: Ingo Molnar @ 2016-07-20 10:41 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Arnd Bergmann, Alexandre Courbot, Alexander Stein,
	William Breathitt Gray, linux-gpio@vger.kernel.org,
	linux-kernel@vger.kernel.org


* Linus Walleij <linus.walleij@linaro.org> wrote:

> On Wed, Jul 6, 2016 at 2:54 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> 
> > I stumbled over a build error with COMPILE_TEST and CONFIG_OF
> > disabled:
> >
> > drivers/gpio/gpio-tegra.c: In function 'tegra_gpio_probe':
> > drivers/gpio/gpio-tegra.c:603:9: error: 'struct gpio_chip' has no member named 'of_node'
> >
> > The problem is that the newly added GPIO_TEGRA Kconfig symbol
> > does not have a dependency on CONFIG_OF. However, there is another
> > problem here as the driver gets enabled unconditionally whenever
> > COMPILE_TEST is set.
> >
> > This fixes both problems, by making the symbol user-visible
> > when COMPILE_TEST is set and default-enabled for ARCH_TEGRA=y.
> >
> > As a side-effect, it is now possible to compile-test a Tegra
> > kernel with GPIO support disabled, which is harmless.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > Fixes: 4dd4dd1d2120 ("gpio: tegra: Allow compile test")
> 
> Patch applied.

This is still not upstream and this build failure is very prominent in the 
upstream kernel right now.

> I'm starting to get a bit tired about anything related to compile testing.

They are very useful in finding real problems as well, and some people
(like me! :-) rely on being able to generate random kernel images and
 boot them.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gpio: tegra: don't auto-enable for COMPILE_TEST
  2016-07-20 10:41   ` Ingo Molnar
@ 2016-07-20 11:07     ` Arnd Bergmann
  2016-07-22 13:39     ` Linus Walleij
  1 sibling, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2016-07-20 11:07 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Walleij, Alexandre Courbot, Alexander Stein,
	William Breathitt Gray, linux-gpio@vger.kernel.org,
	linux-kernel@vger.kernel.org

On Wednesday, July 20, 2016 12:41:48 PM CEST Ingo Molnar wrote:
> * Linus Walleij <linus.walleij@linaro.org> wrote:
> 
> > On Wed, Jul 6, 2016 at 2:54 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > 
> > > I stumbled over a build error with COMPILE_TEST and CONFIG_OF
> > > disabled:
> > >
> > > drivers/gpio/gpio-tegra.c: In function 'tegra_gpio_probe':
> > > drivers/gpio/gpio-tegra.c:603:9: error: 'struct gpio_chip' has no member named 'of_node'
> > >
> > > The problem is that the newly added GPIO_TEGRA Kconfig symbol
> > > does not have a dependency on CONFIG_OF. However, there is another
> > > problem here as the driver gets enabled unconditionally whenever
> > > COMPILE_TEST is set.
> > >
> > > This fixes both problems, by making the symbol user-visible
> > > when COMPILE_TEST is set and default-enabled for ARCH_TEGRA=y.
> > >
> > > As a side-effect, it is now possible to compile-test a Tegra
> > > kernel with GPIO support disabled, which is harmless.
> > >
> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > > Fixes: 4dd4dd1d2120 ("gpio: tegra: Allow compile test")
> > 
> > Patch applied.
> 
> This is still not upstream and this build failure is very prominent in the 
> upstream kernel right now.

Note that Linus Walleij is currently on vacation. I don't know
if Alexandre could forward this patch in the meantime.

I also have another patch for a similar regression in linux-next
that prevents an x86 allmodconfig kernel with CONFIG_OF=n
from building (see "pinctrl: bcm: add OF dependencies") and that
one hasn't made it into -next yet (unlike this one that is
fixed in -next but broken in v4.7).

> > I'm starting to get a bit tired about anything related to compile testing.
> 
> They are very useful in finding real problems as well, and some people
> (like me!  rely on being able to generate random kernel images and
>  boot them.

Agreed, I send many patches for build-time regressions every week. Most
of them are for harmless problems, but the other ones that find actual
bugs make it absolutely worthwhile.

I don't mind doing this, and most folks are happy to get an early
feedback about when things break. What's annoying is when I send
a patch within hours after a linux-next release that breaks something
and then the bug makes it into mainline anyway, weeks later.

	Arnd

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gpio: tegra: don't auto-enable for COMPILE_TEST
  2016-07-20 10:41   ` Ingo Molnar
  2016-07-20 11:07     ` Arnd Bergmann
@ 2016-07-22 13:39     ` Linus Walleij
  1 sibling, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2016-07-22 13:39 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Arnd Bergmann, Alexandre Courbot, Alexander Stein,
	William Breathitt Gray, linux-gpio@vger.kernel.org,
	linux-kernel@vger.kernel.org

On Wed, Jul 20, 2016 at 12:41 PM, Ingo Molnar <mingo@kernel.org> wrote:

>> Patch applied.
>
> This is still not upstream and this build failure is very prominent in the
> upstream kernel right now.

Sent it off to Torvalds, sorry for the delay. A case of bad connectivity
in my resort or I would have dealt with it quicker :(

>> I'm starting to get a bit tired about anything related to compile testing.
>
> They are very useful in finding real problems as well, and some people
> (like me! :-) rely on being able to generate random kernel images and
>  boot them.

Yeah that is good. I have a huge pile of enablement patches in my
tree, I just need to find someone to merge them one-by-one preceded
by fixes to the problems they bring to the surface...

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-07-22 13:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-06 12:54 [PATCH] gpio: tegra: don't auto-enable for COMPILE_TEST Arnd Bergmann
2016-07-06 13:38 ` Linus Walleij
2016-07-20 10:41   ` Ingo Molnar
2016-07-20 11:07     ` Arnd Bergmann
2016-07-22 13:39     ` Linus Walleij

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).