Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1345741 > unrolled thread

[PATCH] platform/x86: never 'select DMI' from a driver

Started byArnd Bergmann <arnd@arndb.de>
First post2016-02-29 13:20 +0100
Last post2016-03-01 00:20 +0100
Articles 6 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] platform/x86: never 'select DMI' from a driver Arnd Bergmann <arnd@arndb.de> - 2016-02-29 13:20 +0100
    Re: [PATCH] platform/x86: never 'select DMI' from a driver Andy Lutomirski <luto@amacapital.net> - 2016-02-29 16:50 +0100
      Re: [PATCH] platform/x86: never 'select DMI' from a driver Darren Hart <dvhart@infradead.org> - 2016-03-01 00:10 +0100
        Re: [PATCH] platform/x86: never 'select DMI' from a driver Darren Hart <dvhart@infradead.org> - 2016-03-01 00:20 +0100
        Re: [PATCH] platform/x86: never 'select DMI' from a driver Andy Lutomirski <luto@amacapital.net> - 2016-03-01 00:20 +0100
    Re: [PATCH] platform/x86: never 'select DMI' from a driver Darren Hart <dvhart@infradead.org> - 2016-03-01 00:20 +0100

#1345741 — [PATCH] platform/x86: never 'select DMI' from a driver

FromArnd Bergmann <arnd@arndb.de>
Date2016-02-29 13:20 +0100
Subject[PATCH] platform/x86: never 'select DMI' from a driver
Message-ID<r7uXT-2SL-3@gated-at.bofh.it>
CONFIG_DMI is a user-selectable Kconfig symbol that some drivers
depend on. As part of a recent patch, other drivers started
adding a 'select' for the same symbol, which now causes
a recursive dependency:

drivers/gpio/Kconfig:34:error: recursive dependency detected!
subsection "Kconfig recursive dependency limitations"
drivers/gpio/Kconfig:34:        symbol GPIOLIB is selected by GEOS
For a resolution refer to Documentation/kbuild/kconfig-language.txt
subsection "Kconfig recursive dependency limitations"
arch/x86/Kconfig:2591:  symbol GEOS depends on DMI
For a resolution refer to Documentation/kbuild/kconfig-language.txt
subsection "Kconfig recursive dependency limitations"
arch/x86/Kconfig:815:   symbol DMI is selected by DELL_LAPTOP
For a resolution refer to Documentation/kbuild/kconfig-language.txt
subsection "Kconfig recursive dependency limitations"
drivers/platform/x86/Kconfig:104:       symbol DELL_LAPTOP depends on BACKLIGHT_CLASS_DEVICE
For a resolution refer to Documentation/kbuild/kconfig-language.txt
subsection "Kconfig recursive dependency limitations"
drivers/video/backlight/Kconfig:158:    symbol BACKLIGHT_CLASS_DEVICE is selected by FB_BACKLIGHT
For a resolution refer to Documentation/kbuild/kconfig-language.txt
subsection "Kconfig recursive dependency limitations"
drivers/video/fbdev/Kconfig:192:        symbol FB_BACKLIGHT is selected by FB_SSD1307
For a resolution refer to Documentation/kbuild/kconfig-language.txt
subsection "Kconfig recursive dependency limitations"
drivers/video/fbdev/Kconfig:2462:       symbol FB_SSD1307 depends on GPIOLIB

Basically we should either always use 'depends on' or always use 'select'
to avoid this kind of loop. Using 'depends on' is more useful here,
as it still allows users to turn off the symbol of they really
want to, without having to track down every driver selecting it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: cbd9d95b2b27 ("dell-wmi, dell-laptop: select DMI")
---
 drivers/platform/x86/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 659e13b1e6f0..a65d974f387a 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -105,6 +105,7 @@ config DELL_LAPTOP
 	tristate "Dell Laptop Extras"
 	depends on X86
 	depends on DELL_SMBIOS
+	depends on DMI
 	depends on BACKLIGHT_CLASS_DEVICE
 	depends on ACPI_VIDEO || ACPI_VIDEO = n
 	depends on RFKILL || RFKILL = n
@@ -112,7 +113,6 @@ config DELL_LAPTOP
 	select POWER_SUPPLY
 	select LEDS_CLASS
 	select NEW_LEDS
-	select DMI
 	default n
 	---help---
 	This driver adds support for rfkill and backlight control to Dell
@@ -121,10 +121,10 @@ config DELL_LAPTOP
 config DELL_WMI
 	tristate "Dell WMI extras"
 	depends on ACPI_WMI
+	depends on DMI
 	depends on INPUT
 	depends on ACPI_VIDEO || ACPI_VIDEO = n
 	select INPUT_SPARSEKMAP
-	select DMI
 	---help---
 	  Say Y here if you want to support WMI-based hotkeys on Dell laptops.
 
-- 
2.7.0

[toc] | [next] | [standalone]


#1345924

FromAndy Lutomirski <luto@amacapital.net>
Date2016-02-29 16:50 +0100
Message-ID<r7yf8-4UY-13@gated-at.bofh.it>
In reply to#1345741
On Mon, Feb 29, 2016 at 4:13 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> CONFIG_DMI is a user-selectable Kconfig symbol that some drivers
> depend on. As part of a recent patch, other drivers started
> adding a 'select' for the same symbol, which now causes
> a recursive dependency:

Darren, it may make sense for you to fold the DELL_LAPTOP change in.

--Andy

>
> drivers/gpio/Kconfig:34:error: recursive dependency detected!
> subsection "Kconfig recursive dependency limitations"
> drivers/gpio/Kconfig:34:        symbol GPIOLIB is selected by GEOS
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> arch/x86/Kconfig:2591:  symbol GEOS depends on DMI
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> arch/x86/Kconfig:815:   symbol DMI is selected by DELL_LAPTOP
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> drivers/platform/x86/Kconfig:104:       symbol DELL_LAPTOP depends on BACKLIGHT_CLASS_DEVICE
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> drivers/video/backlight/Kconfig:158:    symbol BACKLIGHT_CLASS_DEVICE is selected by FB_BACKLIGHT
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> drivers/video/fbdev/Kconfig:192:        symbol FB_BACKLIGHT is selected by FB_SSD1307
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> drivers/video/fbdev/Kconfig:2462:       symbol FB_SSD1307 depends on GPIOLIB
>
> Basically we should either always use 'depends on' or always use 'select'
> to avoid this kind of loop. Using 'depends on' is more useful here,
> as it still allows users to turn off the symbol of they really
> want to, without having to track down every driver selecting it.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: cbd9d95b2b27 ("dell-wmi, dell-laptop: select DMI")
> ---
>  drivers/platform/x86/Kconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
> index 659e13b1e6f0..a65d974f387a 100644
> --- a/drivers/platform/x86/Kconfig
> +++ b/drivers/platform/x86/Kconfig
> @@ -105,6 +105,7 @@ config DELL_LAPTOP
>         tristate "Dell Laptop Extras"
>         depends on X86
>         depends on DELL_SMBIOS
> +       depends on DMI
>         depends on BACKLIGHT_CLASS_DEVICE
>         depends on ACPI_VIDEO || ACPI_VIDEO = n
>         depends on RFKILL || RFKILL = n
> @@ -112,7 +113,6 @@ config DELL_LAPTOP
>         select POWER_SUPPLY
>         select LEDS_CLASS
>         select NEW_LEDS
> -       select DMI
>         default n
>         ---help---
>         This driver adds support for rfkill and backlight control to Dell
> @@ -121,10 +121,10 @@ config DELL_LAPTOP
>  config DELL_WMI
>         tristate "Dell WMI extras"
>         depends on ACPI_WMI
> +       depends on DMI
>         depends on INPUT
>         depends on ACPI_VIDEO || ACPI_VIDEO = n
>         select INPUT_SPARSEKMAP
> -       select DMI
>         ---help---
>           Say Y here if you want to support WMI-based hotkeys on Dell laptops.
>
> --
> 2.7.0
>



-- 
Andy Lutomirski
AMA Capital Management, LLC

[toc] | [prev] | [next] | [standalone]


#1346238

FromDarren Hart <dvhart@infradead.org>
Date2016-03-01 00:10 +0100
Message-ID<r7F6W-115-17@gated-at.bofh.it>
In reply to#1345924
On Mon, Feb 29, 2016 at 07:46:58AM -0800, Andy Lutomirski wrote:
> On Mon, Feb 29, 2016 at 4:13 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> > CONFIG_DMI is a user-selectable Kconfig symbol that some drivers
> > depend on. As part of a recent patch, other drivers started
> > adding a 'select' for the same symbol, which now causes
> > a recursive dependency:
> 
> Darren, it may make sense for you to fold the DELL_LAPTOP change in.

Andy, I didn't quite follow you. Are you referring to this patch from Arnd, or
from the dell-smbios series from Michał?

I'm planning on merging both (Michał's is pending a v5).

-- 
Darren Hart
Intel Open Source Technology Center

[toc] | [prev] | [next] | [standalone]


#1346240

FromDarren Hart <dvhart@infradead.org>
Date2016-03-01 00:20 +0100
Message-ID<r7FgC-14T-5@gated-at.bofh.it>
In reply to#1346238
On Mon, Feb 29, 2016 at 03:13:54PM -0800, Andy Lutomirski wrote:
> On Mon, Feb 29, 2016 at 3:07 PM, Darren Hart <dvhart@infradead.org> wrote:
> > On Mon, Feb 29, 2016 at 07:46:58AM -0800, Andy Lutomirski wrote:
> >> On Mon, Feb 29, 2016 at 4:13 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> >> > CONFIG_DMI is a user-selectable Kconfig symbol that some drivers
> >> > depend on. As part of a recent patch, other drivers started
> >> > adding a 'select' for the same symbol, which now causes
> >> > a recursive dependency:
> >>
> >> Darren, it may make sense for you to fold the DELL_LAPTOP change in.
> >
> > Andy, I didn't quite follow you. Are you referring to this patch from Arnd, or
> > from the dell-smbios series from Michał?
> >
> > I'm planning on merging both (Michał's is pending a v5).
> >
> 
> I meant to fold the "select DMI" -> "depends on DMI" for DELL_WMI into my patch.

Of course. Obvious in retrospect. :-)

-- 
Darren Hart
Intel Open Source Technology Center

[toc] | [prev] | [next] | [standalone]


#1346244

FromAndy Lutomirski <luto@amacapital.net>
Date2016-03-01 00:20 +0100
Message-ID<r7FgC-14T-7@gated-at.bofh.it>
In reply to#1346238
On Mon, Feb 29, 2016 at 3:07 PM, Darren Hart <dvhart@infradead.org> wrote:
> On Mon, Feb 29, 2016 at 07:46:58AM -0800, Andy Lutomirski wrote:
>> On Mon, Feb 29, 2016 at 4:13 AM, Arnd Bergmann <arnd@arndb.de> wrote:
>> > CONFIG_DMI is a user-selectable Kconfig symbol that some drivers
>> > depend on. As part of a recent patch, other drivers started
>> > adding a 'select' for the same symbol, which now causes
>> > a recursive dependency:
>>
>> Darren, it may make sense for you to fold the DELL_LAPTOP change in.
>
> Andy, I didn't quite follow you. Are you referring to this patch from Arnd, or
> from the dell-smbios series from Michał?
>
> I'm planning on merging both (Michał's is pending a v5).
>

I meant to fold the "select DMI" -> "depends on DMI" for DELL_WMI into my patch.

--Andy

-- 
Andy Lutomirski
AMA Capital Management, LLC

[toc] | [prev] | [next] | [standalone]


#1346242

FromDarren Hart <dvhart@infradead.org>
Date2016-03-01 00:20 +0100
Message-ID<r7FgC-14T-11@gated-at.bofh.it>
In reply to#1345741
On Mon, Feb 29, 2016 at 01:13:31PM +0100, Arnd Bergmann wrote:
> CONFIG_DMI is a user-selectable Kconfig symbol that some drivers
> depend on. As part of a recent patch, other drivers started
> adding a 'select' for the same symbol, which now causes
> a recursive dependency:
> 
> drivers/gpio/Kconfig:34:error: recursive dependency detected!
> subsection "Kconfig recursive dependency limitations"
> drivers/gpio/Kconfig:34:        symbol GPIOLIB is selected by GEOS
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> arch/x86/Kconfig:2591:  symbol GEOS depends on DMI
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> arch/x86/Kconfig:815:   symbol DMI is selected by DELL_LAPTOP
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> drivers/platform/x86/Kconfig:104:       symbol DELL_LAPTOP depends on BACKLIGHT_CLASS_DEVICE
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> drivers/video/backlight/Kconfig:158:    symbol BACKLIGHT_CLASS_DEVICE is selected by FB_BACKLIGHT
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> drivers/video/fbdev/Kconfig:192:        symbol FB_BACKLIGHT is selected by FB_SSD1307
> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> drivers/video/fbdev/Kconfig:2462:       symbol FB_SSD1307 depends on GPIOLIB
> 
> Basically we should either always use 'depends on' or always use 'select'
> to avoid this kind of loop. Using 'depends on' is more useful here,
> as it still allows users to turn off the symbol of they really
> want to, without having to track down every driver selecting it.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: cbd9d95b2b27 ("dell-wmi, dell-laptop: select DMI")

Thanks Arnd, queued to testing.

-- 
Darren Hart
Intel Open Source Technology Center

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web