Skip to contentSkip to conversation

drivers: misc: Remove MISC_DEVICES config option

PATCH Superseded Fabio Estevam 5 participants 15 messages Jan 5, 2012 – Jan 24, 2012

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: misc: Remove MISC_DEVICES config option

MISC_DEVICES option alone does not select any kernel code and can cause dependency build warnings, such as:

warning: (KS8851 && AX88796_93CX6 && RTL8180 && RTL8187 && ADM8211 && RT2400PCI && RT2500PCI && RT61PCI && RT2800PCI && R8187SE) selects EEPROM_93CX6 which has unmet direct dependencies (MISC_DEVICES)

Remove MISC_DEVICES option so that any dependency on this symbol is avoided.

---
This applies against linux-next

 drivers/misc/Kconfig                |   17 +++--------------
 drivers/mmc/host/Kconfig            |    1 -
 drivers/net/ethernet/micrel/Kconfig |    1 -
 3 files changed, 3 insertions(+), 16 deletions(-)
drivers/misc/Kconfig +3 -14
index 6a1a092..c779509 100644
@@ -2,24 +2,14 @@
 # Misc strange devices
 #
 
-# This one has to live outside of the MISC_DEVICES conditional,
-# because it may be selected by drivers/platform/x86/hp_accel.
+menu "Misc devices"
+
 config SENSORS_LIS3LV02D
 	tristate
 	depends on INPUT
 	select INPUT_POLLDEV
 	default n
 
-menuconfig MISC_DEVICES
-	bool "Misc devices"
-	---help---
-	  Say Y here to get to see options for device drivers from various
-	  different categories. This option alone does not add any kernel code.
-
-	  If you say N, all options in this submenu will be skipped and disabled.
-
-if MISC_DEVICES
-
 config AD525X_DPOT
 	tristate "Analog Devices Digital Potentiometers"
 	depends on (I2C || SPI) && SYSFS
@@ -516,5 +506,4 @@ source "drivers/misc/ti-st/Kconfig"
 source "drivers/misc/lis3lv02d/Kconfig"
 source "drivers/misc/carma/Kconfig"
 source "drivers/misc/altera-stapl/Kconfig"
-
-endif # MISC_DEVICES
+endmenu
drivers/mmc/host/Kconfig +0 -1
index cf444b0..00fcbed 100644
@@ -477,7 +477,6 @@ config MMC_SDHI
 config MMC_CB710
 	tristate "ENE CB710 MMC/SD Interface support"
 	depends on PCI
-	select MISC_DEVICES
 	select CB710_CORE
 	help
 	  This option enables support for MMC/SD part of ENE CB710/720 Flash
drivers/net/ethernet/micrel/Kconfig +0 -1
index 1ea811c..fe42fc0 100644
@@ -42,7 +42,6 @@ config KS8851
 	select NET_CORE
 	select MII
 	select CRC32
-	select MISC_DEVICES
 	select EEPROM_93CX6
 	---help---
 	  SPI driver for Micrel KS8851 SPI attached network chip.
Signature · 1 line
1.7.1
#1 lore raw
Quoted 5 lines · Fabio Estevam

MISC_DEVICES option alone does not select any kernel code and can cause dependency build warnings, such as:

warning: (KS8851 && AX88796_93CX6 && RTL8180 && RTL8187 && ADM8211 && RT2400PCI && RT2500PCI && RT61PCI && RT2800PCI && R8187SE) selects EEPROM_93CX6 which has unmet direct dependencies (MISC_DEVICES)

Remove MISC_DEVICES option so that any dependency on this symbol is avoided.

Are you sure that this isn't getting confused with the drivers/char/misc.c interface instead of the "throw a bunch of randome drivers into drivers/misc/" issue?

Why would anything ever want to select MISC_DEVICES? What happens if you just remove that select line from the Kconfig?

thanks,

greg k-h

#2 lore raw
Quoted 3 lines · Greg KH

Are you sure that this isn't getting confused with the drivers/char/misc.c interface instead of the "throw a bunch of randome drivers into drivers/misc/" issue?

Sorry, I am not aware of this issue.

Quoted 2 lines

Why would anything ever want to select MISC_DEVICES?  What happens if you just remove that select line from the Kconfig?

Yes, I don´t understand the point of allowing the selection MISC_DEVICES.

IMHO it is potential for causing dependency issues.

Thanks,

Fabio Estevam

#3 lore raw
Quoted 6 lines · Fabio Estevam
Quoted 3 lines · Greg KH

Are you sure that this isn't getting confused with the drivers/char/misc.c interface instead of the "throw a bunch of randome drivers into drivers/misc/" issue?

Quoted 8 lines

Sorry, I am not aware of this issue.

Quoted 2 lines

Why would anything ever want to select MISC_DEVICES?  What happens if you just remove that select line from the Kconfig?

Yes, I don´t understand the point of allowing the selection MISC_DEVICES.

IMHO it is potential for causing dependency issues.

Then remove that selection. Nothing should be depending on a misc driver, if it is, then that implies that this is more than just a "misc" driver, and it should be moved elsewhere.

thanks,

greg k-h

maintainer Acked-by
#4 lore raw
Quoted 12 lines · Greg KH
Quoted 11 lines · Fabio Estevam
Quoted 3 lines · Greg KH

Are you sure that this isn't getting confused with the drivers/char/misc.c interface instead of the "throw a bunch of randome drivers into drivers/misc/" issue?

Sorry, I am not aware of this issue.

Quoted 2 lines

Why would anything ever want to select MISC_DEVICES? What happens if you just remove that select line from the Kconfig?

Quoted 7 lines
Quoted 3 lines

Yes, I don´t understand the point of allowing the selection MISC_DEVICES.

IMHO it is potential for causing dependency issues.

Then remove that selection. Nothing should be depending on a misc driver, if it is, then that implies that this is more than just a "misc" driver, and it should be moved elsewhere.

I think that is true for the majority of stuff we have under drivers/misc anyway. I had done the same patch that Fabio sent a couple of months ago but then forgot about it, so here is a wholehearted

for the new patch. It fixes a real problem, and we applied a similar patch in drivers/mfd as 8a0a8e8e already. We probably still want to find a better home for drivers that frequently get selected by other subsystems as you said, but that is an independent issue. I don't see why anyone would need a way to disable all MISC drivers at once, when the only thing that (in theory) connects them is that they are all different from everything else.

Arnd

#5 lore raw

Hi Greg,

Quoted 6 lines · Arnd Bergmann

I think that is true for the majority of stuff we have under drivers/misc anyway. I had done the same patch that Fabio sent a couple of months ago but then forgot about it, so here is a wholehearted

Quoted 7 lines

for the new patch. It fixes a real problem, and we applied a similar patch in drivers/mfd as 8a0a8e8e already. We probably still want to find a better home for drivers that frequently get selected by other subsystems as you said, but that is an independent issue. I don't see why anyone would need a way to disable all MISC drivers at once, when the only thing that (in theory) connects them is that they are all different from everything else.

Do you have any objections about this patch?

Thanks,

Fabio Estevam

#6 lore raw
Quoted 18 lines · Fabio Estevam

Hi Greg,

Quoted 6 lines · Arnd Bergmann

I think that is true for the majority of stuff we have under drivers/misc anyway. I had done the same patch that Fabio sent a couple of months ago but then forgot about it, so here is a wholehearted

Quoted 7 lines

for the new patch. It fixes a real problem, and we applied a similar patch in drivers/mfd as 8a0a8e8e already. We probably still want to find a better home for drivers that frequently get selected by other subsystems as you said, but that is an independent issue. I don't see why anyone would need a way to disable all MISC drivers at once, when the only thing that (in theory) connects them is that they are all different from everything else.

Quoted 1 line

Do you have any objections about this patch?

Yes, I said my problems with it, I don't recall it being resent afterward, with any changes.

greg k-h

#7 lore raw
In reply to Greg KH
Quoted 2 lines · Greg KH

Then remove that selection.  Nothing should be depending on a misc driver,

Yes, this is the exact issue that this patch tries to solve.

Currently all of these are dependent on MISC_DEVICES being set.

source "drivers/misc/c2port/Kconfig"
source "drivers/misc/eeprom/Kconfig"
source "drivers/misc/cb710/Kconfig"
source "drivers/misc/iwmc3200top/Kconfig"
source "drivers/misc/ti-st/Kconfig"
source "drivers/misc/lis3lv02d/Kconfig"
source "drivers/misc/carma/Kconfig"
source "drivers/misc/altera-stapl/Kconfig"

With the patch applied it is possible to select all the drivers above and we don't need to select MISC_DEVICES.

Regards,

Fabio Estevam

#8 lore raw
Quoted 6 lines · Fabio Estevam
Quoted 2 lines · Greg KH

Then remove that selection.  Nothing should be depending on a misc driver,

Yes, this is the exact issue that this patch tries to solve.

You are seriously going to have to refresh my memory, the patch is many weeks old, and long gone from my recall.

Quoted 11 lines

Currently all of these are dependent on MISC_DEVICES being set.

source "drivers/misc/c2port/Kconfig"
source "drivers/misc/eeprom/Kconfig"
source "drivers/misc/cb710/Kconfig"
source "drivers/misc/iwmc3200top/Kconfig"
source "drivers/misc/ti-st/Kconfig"
source "drivers/misc/lis3lv02d/Kconfig"
source "drivers/misc/carma/Kconfig"
source "drivers/misc/altera-stapl/Kconfig"

Quoted 2 lines

With the patch applied it is possible to select all the drivers above and we don't need to select MISC_DEVICES.

Care to add this to the patch description and resend it as I really don't remember what is going on here.

greg k-h

maintainer
#9 lore raw
Quoted 10 lines · Greg KH
Quoted 6 lines · Fabio Estevam
Quoted 2 lines · Greg KH

Then remove that selection. Nothing should be depending on a misc driver,

Yes, this is the exact issue that this patch tries to solve.

You are seriously going to have to refresh my memory, the patch is many weeks old, and long gone from my recall.

It's a version of the patch that led to you and me getting listed as maintainers. I sent the original version, see the discussion at
http://patchwork.linuxtv.org/patch/316/ with my explanation.

I now saw that my version actually looks better because it removes a few extra 'select MISC_DEVICES' statements as well. I already acked Fabio's patch, but maybe it's better to take my patch and mention Fabio as well in the changelog.

Quoted 11 lines
Quoted 11 lines

Currently all of these are dependent on MISC_DEVICES being set.

source "drivers/misc/c2port/Kconfig"
source "drivers/misc/eeprom/Kconfig"
source "drivers/misc/cb710/Kconfig"
source "drivers/misc/iwmc3200top/Kconfig"
source "drivers/misc/ti-st/Kconfig"
source "drivers/misc/lis3lv02d/Kconfig"
source "drivers/misc/carma/Kconfig"
source "drivers/misc/altera-stapl/Kconfig"

Quoted 5 lines
Quoted 2 lines

With the patch applied it is possible to select all the drivers above and we don't need to select MISC_DEVICES.

Care to add this to the patch description and resend it as I really don't remember what is going on here.

The problem is that we have plenty of drivers that 'select' a configuration option from drivers/misc/Kconfig:

$ git ls-files drivers/misc/ | grep Kconfig | xargs grep ^config | while read DUMMY OPTION ; do git ls-files | grep Kconfig | grep -v drivers/misc | xargs grep "\<select\>.*\<$OPTION\>" ; done
drivers/platform/x86/Kconfig:   select SENSORS_LIS3LV02D
drivers/memstick/host/Kconfig:  select TIFM_CORE
drivers/mmc/host/Kconfig:       select TIFM_CORE
drivers/media/video/cx23885/Kconfig:    select ALTERA_STAPL
drivers/mmc/host/Kconfig:       select CB710_CORE
arch/arm/mach-davinci/Kconfig:  select EEPROM_AT24
arch/arm/mach-davinci/Kconfig:  select EEPROM_AT24
arch/arm/mach-davinci/Kconfig:  select EEPROM_AT24
arch/arm/mach-davinci/Kconfig:  select EEPROM_AT24
arch/arm/mach-davinci/Kconfig:  select EEPROM_AT24
arch/arm/mach-davinci/Kconfig:  select EEPROM_AT24
arch/arm/mach-s3c2440/Kconfig:  select EEPROM_AT24
arch/unicore32/Kconfig: select EEPROM_AT24
drivers/net/ethernet/8390/Kconfig:      select EEPROM_93CX6
drivers/net/ethernet/micrel/Kconfig:    select EEPROM_93CX6
drivers/net/wireless/Kconfig:   select EEPROM_93CX6
drivers/net/wireless/rt2x00/Kconfig:    select EEPROM_93CX6
drivers/net/wireless/rt2x00/Kconfig:    select EEPROM_93CX6
drivers/net/wireless/rt2x00/Kconfig:    select EEPROM_93CX6
drivers/net/wireless/rt2x00/Kconfig:    select EEPROM_93CX6
drivers/net/wireless/rtl818x/Kconfig:   select EEPROM_93CX6
drivers/net/wireless/rtl818x/Kconfig:   select EEPROM_93CX6
drivers/staging/rtl8187se/Kconfig:      select EEPROM_93CX6
drivers/net/wimax/i2400m/Kconfig:       select IWMC3200TOP
drivers/net/wireless/iwmc3200wifi/Kconfig:      select IWMC3200TOP
drivers/media/radio/wl128x/Kconfig:     select TI_ST if NET && GPIOLIB

If MISC_DEVICES is disabled, this causes a build-time warning about missing dependencies in a select statement. Some people have resorted to adding 'select MISC_DEVICES', but that has the unintended side-effect of unhiding all other misc drivers when one of the dependent options is enabled.

Arnd

#10 lore raw
In reply to Fabio Estevam
Quoted 5 lines · Fabio Estevam

MISC_DEVICES option alone does not select any kernel code and can cause dependency build warnings, such as:

warning: (KS8851 && AX88796_93CX6 && RTL8180 && RTL8187 && ADM8211 && RT2400PCI && RT2500PCI && RT61PCI && RT2800PCI && R8187SE) selects EEPROM_93CX6 which has unmet direct dependencies (MISC_DEVICES)

Remove MISC_DEVICES option so that any dependency on this symbol is avoided.

I thought that one purpose of MISC_DEVICES was to allow anyone to disable all options under it with one click (or keystroke), but since several drivers now "select MISC_DEVICES", that does not work.

I would like to be able to disable all MISC_DEVICES, but since that does not currently function, this change is OK with me.

Quoted 71 lines

---
This applies against linux-next

 drivers/misc/Kconfig                |   17 +++--------------
 drivers/mmc/host/Kconfig            |    1 -
 drivers/net/ethernet/micrel/Kconfig |    1 -
 3 files changed, 3 insertions(+), 16 deletions(-)
drivers/misc/Kconfig +3 -14
index 6a1a092..c779509 100644
@@ -2,24 +2,14 @@
 # Misc strange devices
 #
 
-# This one has to live outside of the MISC_DEVICES conditional,
-# because it may be selected by drivers/platform/x86/hp_accel.
+menu "Misc devices"
+
 config SENSORS_LIS3LV02D
 	tristate
 	depends on INPUT
 	select INPUT_POLLDEV
 	default n
 
-menuconfig MISC_DEVICES
-	bool "Misc devices"
-	---help---
-	  Say Y here to get to see options for device drivers from various
-	  different categories. This option alone does not add any kernel code.
-
-	  If you say N, all options in this submenu will be skipped and disabled.
-
-if MISC_DEVICES
-
 config AD525X_DPOT
 	tristate "Analog Devices Digital Potentiometers"
 	depends on (I2C || SPI) && SYSFS
@@ -516,5 +506,4 @@ source "drivers/misc/ti-st/Kconfig"
 source "drivers/misc/lis3lv02d/Kconfig"
 source "drivers/misc/carma/Kconfig"
 source "drivers/misc/altera-stapl/Kconfig"
-
-endif # MISC_DEVICES
+endmenu
drivers/mmc/host/Kconfig +0 -1
index cf444b0..00fcbed 100644
@@ -477,7 +477,6 @@ config MMC_SDHI
 config MMC_CB710
 	tristate "ENE CB710 MMC/SD Interface support"
 	depends on PCI
-	select MISC_DEVICES
 	select CB710_CORE
 	help
 	  This option enables support for MMC/SD part of ENE CB710/720 Flash
drivers/net/ethernet/micrel/Kconfig +0 -1
index 1ea811c..fe42fc0 100644
@@ -42,7 +42,6 @@ config KS8851
 	select NET_CORE
 	select MII
 	select CRC32
-	select MISC_DEVICES
 	select EEPROM_93CX6
 	---help---
 	  SPI driver for Micrel KS8851 SPI attached network chip.
Signature · 2 lines
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
#11 lore raw
Quoted 5 lines · Randy Dunlap
Quoted 4 lines · Fabio Estevam

MISC_DEVICES option alone does not select any kernel code and can cause dependency build warnings, such as:

warning: (KS8851&& AX88796_93CX6&& RTL8180&& RTL8187&& ADM8211&& RT2400PCI&& RT2500PCI&& RT61PCI&& RT2800PCI&& R8187SE) selects EEPROM_93CX6 which has unmet direct dependencies (MISC_DEVICES)

Quoted 8 lines
Quoted 1 line

Remove MISC_DEVICES option so that any dependency on this symbol is avoided.

I thought that one purpose of MISC_DEVICES was to allow anyone to disable all options under it with one click (or keystroke), but since several drivers now "select MISC_DEVICES", that does not work.

I would like to be able to disable all MISC_DEVICES, but since that does not currently function, this change is OK with me.

All of the drivers in the above list select *only* one driver in the MISC_DEVICES category. If that one were moved outside of MISC_DEVICES, most, if not all,problems would go away.

Larry

#12 lore raw
In reply to Randy Dunlap

Fabio,

Does this patch fix your problem?

Larry

drivers/misc/Kconfig +11 -0
Index: wireless-testing-new/drivers/misc/Kconfig
===================================================================
@@ -10,6 +10,17 @@ config SENSORS_LIS3LV02D
        select INPUT_POLLDEV
        default n
 
+# This selection is used by several wireless devices, and placing it outside
+# the MISC_DEVICES conditional allows those drivers to be built no matter
+# the MISC_DEVICES value.
+config EEPROM_93CX6
+       tristate "EEPROM 93CX6 support"
+       help
+         This is a driver for the EEPROM chipsets 93c46 and 93c66.
+         The driver supports both read as well as write commands.
+
+         If unsure, say N.
+
 menuconfig MISC_DEVICES
        bool "Misc devices"
        ---help---
drivers/misc/eeprom/Kconfig +0 -8
Index: wireless-testing-new/drivers/misc/eeprom/Kconfig
===================================================================
@@ -62,14 +62,6 @@ config EEPROM_MAX6875
          will be called max6875.
 
 
-config EEPROM_93CX6
-       tristate "EEPROM 93CX6 support"
-       help
-         This is a driver for the EEPROM chipsets 93c46 and 93c66.
-         The driver supports both read as well as write commands.
-
-         If unsure, say N.
-
 config EEPROM_93XX46
        tristate "Microwire EEPROM 93XX46 support"
        depends on SPI && SYSFS
#13 lore raw
Quoted 3 lines · Larry Finger

Fabio,

Does this patch fix your problem?

It will fix this specific EEPROM_93CX6 issue, but I recall seeing other similar cases of build warnings related to the missing dependency of MISC_DEVICES. I can´t provide any other examples until Tuesday next week.

Instead of fixing each instance where this MISC_DEPENDENCY issue happens, I think that removing MISC_DEVICES could be a good fix.

Regards,

Fabio Estevam

#14 lore raw

PATCH v2 1/1 drivers: misc: Remove MISC_DEVICES config option

In reply to Fabio Estevam

MISC_DEVICES option alone does not select any kernel code and can cause dependency build warnings, such as:

warning: (KS8851 && AX88796_93CX6 && RTL8180 && RTL8187 && ADM8211 && RT2400PCI && RT2500PCI && RT61PCI && RT2800PCI && R8187SE) selects EEPROM_93CX6 which has unmet direct dependencies (MISC_DEVICES)

As the current drivers/misc/Kconfig stands, it is only possible to select the drivers below if MISC_DEVICES option is selected:

source "drivers/misc/c2port/Kconfig"
source "drivers/misc/eeprom/Kconfig"
source "drivers/misc/cb710/Kconfig"
source "drivers/misc/iwmc3200top/Kconfig"
source "drivers/misc/ti-st/Kconfig"
source "drivers/misc/lis3lv02d/Kconfig"
source "drivers/misc/carma/Kconfig"
source "drivers/misc/altera-stapl/Kconfig"

So remove MISC_DEVICES option so that nothing is dependant on it.

---
Changes since v1:
- Improved commit message
This applies against linux-next

 drivers/misc/Kconfig                |   17 +++--------------
 drivers/mmc/host/Kconfig            |    1 -
 drivers/net/ethernet/micrel/Kconfig |    1 -
 3 files changed, 3 insertions(+), 16 deletions(-)
drivers/misc/Kconfig +3 -14
index 6a1a092..c779509 100644
@@ -2,24 +2,14 @@
 # Misc strange devices
 #
 
-# This one has to live outside of the MISC_DEVICES conditional,
-# because it may be selected by drivers/platform/x86/hp_accel.
+menu "Misc devices"
+
 config SENSORS_LIS3LV02D
 	tristate
 	depends on INPUT
 	select INPUT_POLLDEV
 	default n
 
-menuconfig MISC_DEVICES
-	bool "Misc devices"
-	---help---
-	  Say Y here to get to see options for device drivers from various
-	  different categories. This option alone does not add any kernel code.
-
-	  If you say N, all options in this submenu will be skipped and disabled.
-
-if MISC_DEVICES
-
 config AD525X_DPOT
 	tristate "Analog Devices Digital Potentiometers"
 	depends on (I2C || SPI) && SYSFS
@@ -516,5 +506,4 @@ source "drivers/misc/ti-st/Kconfig"
 source "drivers/misc/lis3lv02d/Kconfig"
 source "drivers/misc/carma/Kconfig"
 source "drivers/misc/altera-stapl/Kconfig"
-
-endif # MISC_DEVICES
+endmenu
drivers/mmc/host/Kconfig +0 -1
index cf444b0..00fcbed 100644
@@ -477,7 +477,6 @@ config MMC_SDHI
 config MMC_CB710
 	tristate "ENE CB710 MMC/SD Interface support"
 	depends on PCI
-	select MISC_DEVICES
 	select CB710_CORE
 	help
 	  This option enables support for MMC/SD part of ENE CB710/720 Flash
drivers/net/ethernet/micrel/Kconfig +0 -1
index 1ea811c..fe42fc0 100644
@@ -42,7 +42,6 @@ config KS8851
 	select NET_CORE
 	select MII
 	select CRC32
-	select MISC_DEVICES
 	select EEPROM_93CX6
 	---help---
 	  SPI driver for Micrel KS8851 SPI attached network chip.
Signature · 1 line
1.7.1