2012-01-05 13:38:07

by Fabio Estevam

[permalink] [raw]
Subject: [PATCH v2] drivers: net: Fix dependency for EEPROM_93CX6

Fix the following build warning:

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

Signed-off-by: Fabio Estevam <[email protected]>
---
Changes since v1:
- Place MISC_DEVICES dependency into the 'depends on' line

drivers/net/ethernet/8390/Kconfig | 2 +-
drivers/net/wireless/Kconfig | 2 +-
drivers/net/wireless/rt2x00/Kconfig | 7 ++++---
drivers/net/wireless/rtl818x/Kconfig | 4 ++--
4 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/8390/Kconfig b/drivers/net/ethernet/8390/Kconfig
index e04ade4..993e0fa 100644
--- a/drivers/net/ethernet/8390/Kconfig
+++ b/drivers/net/ethernet/8390/Kconfig
@@ -68,7 +68,7 @@ config AX88796

config AX88796_93CX6
bool "ASIX AX88796 external 93CX6 eeprom support"
- depends on AX88796
+ depends on AX88796 && MISC_DEVICES
select EEPROM_93CX6
---help---
Select this if your platform comes with an external 93CX6 eeprom.
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
index abd3b71..ef7fff0 100644
--- a/drivers/net/wireless/Kconfig
+++ b/drivers/net/wireless/Kconfig
@@ -221,7 +221,7 @@ source "drivers/net/wireless/rtl818x/Kconfig"

config ADM8211
tristate "ADMtek ADM8211 support"
- depends on MAC80211 && PCI && EXPERIMENTAL
+ depends on MAC80211 && PCI && EXPERIMENTAL && MISC_DEVICES
select CRC32
select EEPROM_93CX6
---help---
diff --git a/drivers/net/wireless/rt2x00/Kconfig b/drivers/net/wireless/rt2x00/Kconfig
index a0a7854..bccd5c6 100644
--- a/drivers/net/wireless/rt2x00/Kconfig
+++ b/drivers/net/wireless/rt2x00/Kconfig
@@ -19,7 +19,7 @@ if RT2X00

config RT2400PCI
tristate "Ralink rt2400 (PCI/PCMCIA) support"
- depends on PCI
+ depends on PCI && MISC_DEVICES
select RT2X00_LIB_PCI
select EEPROM_93CX6
---help---
@@ -30,7 +30,7 @@ config RT2400PCI

config RT2500PCI
tristate "Ralink rt2500 (PCI/PCMCIA) support"
- depends on PCI
+ depends on PCI && MISC_DEVICES
select RT2X00_LIB_PCI
select EEPROM_93CX6
---help---
@@ -41,7 +41,7 @@ config RT2500PCI

config RT61PCI
tristate "Ralink rt2501/rt61 (PCI/PCMCIA) support"
- depends on PCI
+ depends on PCI && MISC_DEVICES
select RT2X00_LIB_PCI
select RT2X00_LIB_FIRMWARE
select RT2X00_LIB_CRYPTO
@@ -56,6 +56,7 @@ config RT61PCI
config RT2800PCI
tristate "Ralink rt27xx/rt28xx/rt30xx (PCI/PCIe/PCMCIA) support"
depends on PCI || RALINK_RT288X || RALINK_RT305X
+ depends on MISC_DEVICES
select RT2800_LIB
select RT2X00_LIB_PCI if PCI
select RT2X00_LIB_SOC if RALINK_RT288X || RALINK_RT305X
diff --git a/drivers/net/wireless/rtl818x/Kconfig b/drivers/net/wireless/rtl818x/Kconfig
index 17d80fe..7d7268e 100644
--- a/drivers/net/wireless/rtl818x/Kconfig
+++ b/drivers/net/wireless/rtl818x/Kconfig
@@ -3,7 +3,7 @@
#
config RTL8180
tristate "Realtek 8180/8185 PCI support"
- depends on MAC80211 && PCI && EXPERIMENTAL
+ depends on MAC80211 && PCI && EXPERIMENTAL && MISC_DEVICES
select EEPROM_93CX6
---help---
This is a driver for RTL8180 and RTL8185 based cards.
@@ -59,7 +59,7 @@ config RTL8180

config RTL8187
tristate "Realtek 8187 and 8187B USB support"
- depends on MAC80211 && USB
+ depends on MAC80211 && USB && MISC_DEVICES
select EEPROM_93CX6
---help---
This is a driver for RTL8187 and RTL8187B based cards.
--
1.7.1



2012-01-05 19:23:15

by David Miller

[permalink] [raw]
Subject: Re: [PATCH v2] drivers: net: Fix dependency for EEPROM_93CX6

From: Ben Hutchings <[email protected]>
Date: Thu, 5 Jan 2012 19:17:58 +0000

> Right, you'll have to delete all dependencies on MISC_DEVICES. Maybe
> remove it from defconfigs as well, though I'm not sure whether it's
> normal to do that at the same time.

defconfigs are usually left to the arch maintainers to update.

2012-01-05 16:11:26

by Larry Finger

[permalink] [raw]
Subject: Re: [PATCH v2] drivers: net: Fix dependency for EEPROM_93CX6

On 01/05/2012 07:37 AM, Fabio Estevam wrote:
> Fix the following build warning:
>
> warning: (KS8851&& AX88796_93CX6&& RTL8180&& RTL8187&& ADM8211&& RT2400PCI&& RT2500PCI&& RT61PCI&& RT2800PCI&& R8187SE) selects EEPROM_93CX6 which has unmet direct dependencies (MISC_DEVICES)
>
> Signed-off-by: Fabio Estevam<[email protected]>
> ---
> Changes since v1:
> - Place MISC_DEVICES dependency into the 'depends on' line

Is this the right way to fix this? Whenever I get this kind of build warning, I
usually attribute it to a problem with my local configuration and fix my copy of
.config, not modify the build system. With this change, it seems to me that a
lot of devices will suddenly disappear from the build with little explanation. I
don't feel confident enough to NACK the patch, but I would like an expert to
comment.

I have noticed that the defconfigs for various architectures are split between
turning MISC_DEVICES on or off.

Larry

2012-01-05 19:18:09

by Ben Hutchings

[permalink] [raw]
Subject: Re: [PATCH v2] drivers: net: Fix dependency for EEPROM_93CX6

On Thu, 2012-01-05 at 17:02 -0200, Fabio Estevam wrote:
> On Thu, Jan 5, 2012 at 4:06 PM, Fabio Estevam <[email protected]> wrote:
>
> > I have tried selecting MISC_DEVICES in the Kconfig's, but the warning remains.
> >
> > I agree with Ben's comment: "That seems like a bug, since MISC_DEVICES
> > doesn't by itself select any
> > code. (It's also not a meaningful category and maybe ought not to be an
> > option at all.)"
>
> What about the aproach below?
>
> drivers/misc/Kconfig | 12 ++----------
> 1 files changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
> index 6a1a092..9c7a474 100644
> --- a/drivers/misc/Kconfig
> +++ b/drivers/misc/Kconfig
> @@ -10,15 +10,8 @@ config SENSORS_LIS3LV02D
> 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.
> +menu "Misc devices"
>
> -if MISC_DEVICES
>
> config AD525X_DPOT
> tristate "Analog Devices Digital Potentiometers"
> @@ -516,5 +509,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

Yes, that's what I was thinking of.

> This would remove the unneeded dependency of MISC_DEVICES.
>
> I know I need to take extra care not to break other things, but just
> would like to get a feedback if this approach goes into the right
> direction.

Right, you'll have to delete all dependencies on MISC_DEVICES. Maybe
remove it from defconfigs as well, though I'm not sure whether it's
normal to do that at the same time.

Ben.

--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


2012-01-05 17:21:16

by David Miller

[permalink] [raw]
Subject: Re: [PATCH v2] drivers: net: Fix dependency for EEPROM_93CX6

From: Larry Finger <[email protected]>
Date: Thu, 05 Jan 2012 10:11:21 -0600

> On 01/05/2012 07:37 AM, Fabio Estevam wrote:
>> Fix the following build warning:
>>
>> warning: (KS8851&& AX88796_93CX6&& RTL8180&& RTL8187&& ADM8211&&
>> RT2400PCI&& RT2500PCI&& RT61PCI&& RT2800PCI&& R8187SE) selects
>> EEPROM_93CX6 which has unmet direct dependencies (MISC_DEVICES)
>>
>> Signed-off-by: Fabio Estevam<[email protected]>
>> ---
>> Changes since v1:
>> - Place MISC_DEVICES dependency into the 'depends on' line
>
> Is this the right way to fix this? Whenever I get this kind of build
> warning, I usually attribute it to a problem with my local
> configuration and fix my copy of .config, not modify the build
> system. With this change, it seems to me that a lot of devices will
> suddenly disappear from the build with little explanation. I don't
> feel confident enough to NACK the patch, but I would like an expert to
> comment.
>
> I have noticed that the defconfigs for various architectures are split
> between turning MISC_DEVICES on or off.

Right, this is definitely the wrong fix, "select" is the right way to
fix this because no user should have to know the gory details of what
random odd config variables have to be on already in order to turn on
support for a device they are interested in.

Fix this right, by using "select MISC_DEVICES"

2012-01-05 20:16:42

by Larry Finger

[permalink] [raw]
Subject: Re: [PATCH v2] drivers: net: Fix dependency for EEPROM_93CX6

On 01/05/2012 01:17 PM, Ben Hutchings wrote:
> On Thu, 2012-01-05 at 17:02 -0200, Fabio Estevam wrote:
>> On Thu, Jan 5, 2012 at 4:06 PM, Fabio Estevam<[email protected]> wrote:
>>
>>> I have tried selecting MISC_DEVICES in the Kconfig's, but the warning remains.
>>>
>>> I agree with Ben's comment: "That seems like a bug, since MISC_DEVICES
>>> doesn't by itself select any
>>> code. (It's also not a meaningful category and maybe ought not to be an
>>> option at all.)"
>>
>> What about the aproach below?
>>
>> drivers/misc/Kconfig | 12 ++----------
>> 1 files changed, 2 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
>> index 6a1a092..9c7a474 100644
>> --- a/drivers/misc/Kconfig
>> +++ b/drivers/misc/Kconfig
>> @@ -10,15 +10,8 @@ config SENSORS_LIS3LV02D
>> 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.
>> +menu "Misc devices"
>>
>> -if MISC_DEVICES
>>
>> config AD525X_DPOT
>> tristate "Analog Devices Digital Potentiometers"
>> @@ -516,5 +509,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
>
> Yes, that's what I was thinking of.
>
>> This would remove the unneeded dependency of MISC_DEVICES.
>>
>> I know I need to take extra care not to break other things, but just
>> would like to get a feedback if this approach goes into the right
>> direction.
>
> Right, you'll have to delete all dependencies on MISC_DEVICES. Maybe
> remove it from defconfigs as well, though I'm not sure whether it's
> normal to do that at the same time.

I also think this is the correct approach.

In the drivers/ tree, there are two mentions of MISC_DEVICES left:

finger@larrylap:~/wireless-testing-new> grep -r MISC_DEVICES drivers/*
drivers/misc/Kconfig:# This one has to live outside of the MISC_DEVICES conditional,
drivers/mmc/host/Kconfig: select MISC_DEVICES

Larry


2012-01-05 19:02:48

by Fabio Estevam

[permalink] [raw]
Subject: Re: [PATCH v2] drivers: net: Fix dependency for EEPROM_93CX6

On Thu, Jan 5, 2012 at 4:06 PM, Fabio Estevam <[email protected]> wrote:

> I have tried selecting MISC_DEVICES in the Kconfig's, but the warning remains.
>
> I agree with Ben's comment: "That seems like a bug, since MISC_DEVICES
> doesn't by itself select any
> code.  (It's also not a meaningful category and maybe ought not to be an
> option at all.)"

What about the aproach below?

drivers/misc/Kconfig | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 6a1a092..9c7a474 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -10,15 +10,8 @@ config SENSORS_LIS3LV02D
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.
+menu "Misc devices"

-if MISC_DEVICES

config AD525X_DPOT
tristate "Analog Devices Digital Potentiometers"
@@ -516,5 +509,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
--

This would remove the unneeded dependency of MISC_DEVICES.

I know I need to take extra care not to break other things, but just
would like to get a feedback if this approach goes into the right
direction.

Thanks,

Fabio Estevam

2012-01-05 17:03:32

by Ben Hutchings

[permalink] [raw]
Subject: Re: [PATCH v2] drivers: net: Fix dependency for EEPROM_93CX6

On Thu, 2012-01-05 at 10:11 -0600, Larry Finger wrote:
> On 01/05/2012 07:37 AM, Fabio Estevam wrote:
> > Fix the following build warning:
> >
> > warning: (KS8851&& AX88796_93CX6&& RTL8180&& RTL8187&& ADM8211&& RT2400PCI&& RT2500PCI&& RT61PCI&& RT2800PCI&& R8187SE) selects EEPROM_93CX6 which has unmet direct dependencies (MISC_DEVICES)
> >
> > Signed-off-by: Fabio Estevam<[email protected]>
> > ---
> > Changes since v1:
> > - Place MISC_DEVICES dependency into the 'depends on' line
>
> Is this the right way to fix this? Whenever I get this kind of build warning, I
> usually attribute it to a problem with my local configuration and fix my copy of
> .config, not modify the build system. With this change, it seems to me that a
> lot of devices will suddenly disappear from the build with little explanation.

I entirely agree.

> I don't feel confident enough to NACK the patch, but I would like an expert to
> comment.

I'm not an expert but am prepared to be opinionated!

> I have noticed that the defconfigs for various architectures are split between
> turning MISC_DEVICES on or off.

That seems like a bug, since MISC_DEVICES doesn't by itself select any
code. (It's also not a meaningful category and maybe ought not to be an
option at all.)

Ben.

--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


2012-01-05 18:06:56

by Fabio Estevam

[permalink] [raw]
Subject: Re: [PATCH v2] drivers: net: Fix dependency for EEPROM_93CX6

On Thu, Jan 5, 2012 at 3:20 PM, David Miller <[email protected]> wrote:

> Right, this is definitely the wrong fix, "select" is the right way to
> fix this because no user should have to know the gory details of what
> random odd config variables have to be on already in order to turn on
> support for a device they are interested in.
>
> Fix this right, by using "select MISC_DEVICES"

I have tried selecting MISC_DEVICES in the Kconfig's, but the warning remains.

I agree with Ben's comment: "That seems like a bug, since MISC_DEVICES
doesn't by itself select any
code. (It's also not a meaningful category and maybe ought not to be an
option at all.)"

Regards,

Fabio Estevam