linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: misc: Remove MISC_DEVICES config option
@ 2012-01-05 20:49 Fabio Estevam
  2012-01-05 22:39 ` Greg KH
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Fabio Estevam @ 2012-01-05 20:49 UTC (permalink / raw)
  To: netdev
  Cc: gwingerde, larry.finger, davem, bhutchings, greg, arnd,
	linux-kernel, Fabio Estevam, 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.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
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(-)

diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 6a1a092..c779509 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -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
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index cf444b0..00fcbed 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -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
diff --git a/drivers/net/ethernet/micrel/Kconfig b/drivers/net/ethernet/micrel/Kconfig
index 1ea811c..fe42fc0 100644
--- a/drivers/net/ethernet/micrel/Kconfig
+++ b/drivers/net/ethernet/micrel/Kconfig
@@ -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.
-- 
1.7.1


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

* Re: [PATCH] drivers: misc: Remove MISC_DEVICES config option
  2012-01-05 20:49 [PATCH] drivers: misc: Remove MISC_DEVICES config option Fabio Estevam
@ 2012-01-05 22:39 ` Greg KH
  2012-01-06  1:18   ` Fabio Estevam
  2012-01-05 23:45 ` Randy Dunlap
  2012-01-24  4:11 ` [PATCH v2] " Fabio Estevam
  2 siblings, 1 reply; 15+ messages in thread
From: Greg KH @ 2012-01-05 22:39 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: netdev, gwingerde, larry.finger, davem, bhutchings, arnd,
	linux-kernel, Fabio Estevam

On Thu, Jan 05, 2012 at 06:49:01PM -0200, Fabio Estevam wrote:
> 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

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

* Re: [PATCH] drivers: misc: Remove MISC_DEVICES config option
  2012-01-05 23:45 ` Randy Dunlap
@ 2012-01-05 23:42   ` Larry Finger
  2012-01-06  0:08   ` Larry Finger
  1 sibling, 0 replies; 15+ messages in thread
From: Larry Finger @ 2012-01-05 23:42 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Fabio Estevam, netdev, gwingerde, davem, bhutchings, greg, arnd,
	linux-kernel, Fabio Estevam

On 01/05/2012 05:45 PM, Randy Dunlap wrote:
> On 01/05/2012 12:49 PM, Fabio Estevam wrote:
>> 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.

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

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

* Re: [PATCH] drivers: misc: Remove MISC_DEVICES config option
  2012-01-05 20:49 [PATCH] drivers: misc: Remove MISC_DEVICES config option Fabio Estevam
  2012-01-05 22:39 ` Greg KH
@ 2012-01-05 23:45 ` Randy Dunlap
  2012-01-05 23:42   ` Larry Finger
  2012-01-06  0:08   ` Larry Finger
  2012-01-24  4:11 ` [PATCH v2] " Fabio Estevam
  2 siblings, 2 replies; 15+ messages in thread
From: Randy Dunlap @ 2012-01-05 23:45 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: netdev, gwingerde, larry.finger, davem, bhutchings, greg, arnd,
	linux-kernel, Fabio Estevam

On 01/05/2012 12:49 PM, Fabio Estevam wrote:
> 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.


> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> 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(-)
> 
> diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
> index 6a1a092..c779509 100644
> --- a/drivers/misc/Kconfig
> +++ b/drivers/misc/Kconfig
> @@ -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
> diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> index cf444b0..00fcbed 100644
> --- a/drivers/mmc/host/Kconfig
> +++ b/drivers/mmc/host/Kconfig
> @@ -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
> diff --git a/drivers/net/ethernet/micrel/Kconfig b/drivers/net/ethernet/micrel/Kconfig
> index 1ea811c..fe42fc0 100644
> --- a/drivers/net/ethernet/micrel/Kconfig
> +++ b/drivers/net/ethernet/micrel/Kconfig
> @@ -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.


-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

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

* Re: [PATCH] drivers: misc: Remove MISC_DEVICES config option
  2012-01-05 23:45 ` Randy Dunlap
  2012-01-05 23:42   ` Larry Finger
@ 2012-01-06  0:08   ` Larry Finger
  2012-01-06  1:13     ` Fabio Estevam
  1 sibling, 1 reply; 15+ messages in thread
From: Larry Finger @ 2012-01-06  0:08 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Randy Dunlap, netdev, gwingerde, davem, bhutchings, greg, arnd,
	linux-kernel, Fabio Estevam

Fabio,

Does this patch fix your problem?

Larry

Index: wireless-testing-new/drivers/misc/Kconfig
===================================================================
--- wireless-testing-new.orig/drivers/misc/Kconfig
+++ 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---
Index: wireless-testing-new/drivers/misc/eeprom/Kconfig
===================================================================
--- wireless-testing-new.orig/drivers/misc/eeprom/Kconfig
+++ 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



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

* Re: [PATCH] drivers: misc: Remove MISC_DEVICES config option
  2012-01-06  0:08   ` Larry Finger
@ 2012-01-06  1:13     ` Fabio Estevam
  0 siblings, 0 replies; 15+ messages in thread
From: Fabio Estevam @ 2012-01-06  1:13 UTC (permalink / raw)
  To: Larry Finger
  Cc: Randy Dunlap, netdev, gwingerde, davem, bhutchings, greg, arnd,
	linux-kernel, Fabio Estevam

On Thu, Jan 5, 2012 at 10:08 PM, Larry Finger <Larry.Finger@lwfinger.net> wrote:
> 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

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

* Re: [PATCH] drivers: misc: Remove MISC_DEVICES config option
  2012-01-05 22:39 ` Greg KH
@ 2012-01-06  1:18   ` Fabio Estevam
  2012-01-06  5:03     ` Greg KH
  0 siblings, 1 reply; 15+ messages in thread
From: Fabio Estevam @ 2012-01-06  1:18 UTC (permalink / raw)
  To: Greg KH
  Cc: netdev, gwingerde, larry.finger, davem, bhutchings, arnd,
	linux-kernel, Fabio Estevam

On Thu, Jan 5, 2012 at 8:39 PM, Greg KH <greg@kroah.com> wrote:

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

> 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

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

* Re: [PATCH] drivers: misc: Remove MISC_DEVICES config option
  2012-01-06  1:18   ` Fabio Estevam
@ 2012-01-06  5:03     ` Greg KH
  2012-01-06 12:00       ` Arnd Bergmann
  2012-01-24  3:17       ` Fabio Estevam
  0 siblings, 2 replies; 15+ messages in thread
From: Greg KH @ 2012-01-06  5:03 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: netdev, gwingerde, larry.finger, davem, bhutchings, arnd,
	linux-kernel, Fabio Estevam

On Thu, Jan 05, 2012 at 11:18:28PM -0200, Fabio Estevam wrote:
> On Thu, Jan 5, 2012 at 8:39 PM, Greg KH <greg@kroah.com> wrote:
> 
> > 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.
> 
> > 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

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

* Re: [PATCH] drivers: misc: Remove MISC_DEVICES config option
  2012-01-06  5:03     ` Greg KH
@ 2012-01-06 12:00       ` Arnd Bergmann
  2012-01-24  2:57         ` Fabio Estevam
  2012-01-24  3:17       ` Fabio Estevam
  1 sibling, 1 reply; 15+ messages in thread
From: Arnd Bergmann @ 2012-01-06 12:00 UTC (permalink / raw)
  To: Greg KH
  Cc: Fabio Estevam, netdev, gwingerde, larry.finger, davem,
	bhutchings, linux-kernel, Fabio Estevam

On Friday 06 January 2012, Greg KH wrote:
> On Thu, Jan 05, 2012 at 11:18:28PM -0200, Fabio Estevam wrote:
> > On Thu, Jan 5, 2012 at 8:39 PM, Greg KH <greg@kroah.com> wrote:
> > 
> > > 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.
> > 
> > > 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.

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

Acked-by: Arnd Bergmann <arnd@arndb.de>

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

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

* Re: [PATCH] drivers: misc: Remove MISC_DEVICES config option
  2012-01-06 12:00       ` Arnd Bergmann
@ 2012-01-24  2:57         ` Fabio Estevam
  2012-01-24  3:03           ` Greg KH
  0 siblings, 1 reply; 15+ messages in thread
From: Fabio Estevam @ 2012-01-24  2:57 UTC (permalink / raw)
  To: Arnd Bergmann, Greg KH
  Cc: netdev, gwingerde, larry.finger, davem, bhutchings, linux-kernel,
	Fabio Estevam

Hi Greg,

On Fri, Jan 6, 2012 at 10:00 AM, Arnd Bergmann <arnd@arndb.de> wrote:

> 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
>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
>
> 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

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

* Re: [PATCH] drivers: misc: Remove MISC_DEVICES config option
  2012-01-24  2:57         ` Fabio Estevam
@ 2012-01-24  3:03           ` Greg KH
  0 siblings, 0 replies; 15+ messages in thread
From: Greg KH @ 2012-01-24  3:03 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Arnd Bergmann, netdev, gwingerde, larry.finger, davem,
	bhutchings, linux-kernel, Fabio Estevam

On Tue, Jan 24, 2012 at 12:57:36AM -0200, Fabio Estevam wrote:
> Hi Greg,
> 
> On Fri, Jan 6, 2012 at 10:00 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> 
> > 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
> >
> > Acked-by: Arnd Bergmann <arnd@arndb.de>
> >
> > 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?

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

greg k-h

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

* Re: [PATCH] drivers: misc: Remove MISC_DEVICES config option
  2012-01-06  5:03     ` Greg KH
  2012-01-06 12:00       ` Arnd Bergmann
@ 2012-01-24  3:17       ` Fabio Estevam
  2012-01-24  3:48         ` Greg KH
  1 sibling, 1 reply; 15+ messages in thread
From: Fabio Estevam @ 2012-01-24  3:17 UTC (permalink / raw)
  To: Greg KH
  Cc: netdev, gwingerde, larry.finger, davem, bhutchings, arnd,
	linux-kernel, Fabio Estevam

On Fri, Jan 6, 2012 at 3:03 AM, Greg KH <greg@kroah.com> wrote:

> 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

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

* Re: [PATCH] drivers: misc: Remove MISC_DEVICES config option
  2012-01-24  3:17       ` Fabio Estevam
@ 2012-01-24  3:48         ` Greg KH
  2012-01-24 12:25           ` Arnd Bergmann
  0 siblings, 1 reply; 15+ messages in thread
From: Greg KH @ 2012-01-24  3:48 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: netdev, gwingerde, larry.finger, davem, bhutchings, arnd,
	linux-kernel, Fabio Estevam

On Tue, Jan 24, 2012 at 01:17:44AM -0200, Fabio Estevam wrote:
> On Fri, Jan 6, 2012 at 3:03 AM, Greg KH <greg@kroah.com> wrote:
> 
> > 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.

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

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

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

* [PATCH v2] drivers: misc: Remove MISC_DEVICES config option
  2012-01-05 20:49 [PATCH] drivers: misc: Remove MISC_DEVICES config option Fabio Estevam
  2012-01-05 22:39 ` Greg KH
  2012-01-05 23:45 ` Randy Dunlap
@ 2012-01-24  4:11 ` Fabio Estevam
  2 siblings, 0 replies; 15+ messages in thread
From: Fabio Estevam @ 2012-01-24  4:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev, davem, greg, arnd, 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.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
---
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(-)

diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 6a1a092..c779509 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -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
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index cf444b0..00fcbed 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -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
diff --git a/drivers/net/ethernet/micrel/Kconfig b/drivers/net/ethernet/micrel/Kconfig
index 1ea811c..fe42fc0 100644
--- a/drivers/net/ethernet/micrel/Kconfig
+++ b/drivers/net/ethernet/micrel/Kconfig
@@ -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.
-- 
1.7.1


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

* Re: [PATCH] drivers: misc: Remove MISC_DEVICES config option
  2012-01-24  3:48         ` Greg KH
@ 2012-01-24 12:25           ` Arnd Bergmann
  0 siblings, 0 replies; 15+ messages in thread
From: Arnd Bergmann @ 2012-01-24 12:25 UTC (permalink / raw)
  To: Greg KH
  Cc: Fabio Estevam, netdev, gwingerde, larry.finger, davem,
	bhutchings, linux-kernel, Fabio Estevam

On Tuesday 24 January 2012, Greg KH wrote:
> On Tue, Jan 24, 2012 at 01:17:44AM -0200, Fabio Estevam wrote:
> > On Fri, Jan 6, 2012 at 3:03 AM, Greg KH <greg@kroah.com> wrote:
> > 
> > > 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.

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

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

end of thread, other threads:[~2012-01-24 12:26 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-05 20:49 [PATCH] drivers: misc: Remove MISC_DEVICES config option Fabio Estevam
2012-01-05 22:39 ` Greg KH
2012-01-06  1:18   ` Fabio Estevam
2012-01-06  5:03     ` Greg KH
2012-01-06 12:00       ` Arnd Bergmann
2012-01-24  2:57         ` Fabio Estevam
2012-01-24  3:03           ` Greg KH
2012-01-24  3:17       ` Fabio Estevam
2012-01-24  3:48         ` Greg KH
2012-01-24 12:25           ` Arnd Bergmann
2012-01-05 23:45 ` Randy Dunlap
2012-01-05 23:42   ` Larry Finger
2012-01-06  0:08   ` Larry Finger
2012-01-06  1:13     ` Fabio Estevam
2012-01-24  4:11 ` [PATCH v2] " Fabio Estevam

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