[PATCH -next/mmotm] net/can: fix softing build errors

STALE5666d

8 messages, 3 authors, 2011-02-14 · open the first message on its own page

[PATCH -next/mmotm] net/can: fix softing build errors

From: Randy Dunlap <hidden>
Date: 2011-02-12 06:35:30

From: Randy Dunlap <redacted>

Fix can/softing build errors due to kconfig error.

kconfig tells us about a problem...

warning: (CAN_SOFTING_CS) selects CAN_SOFTING which has unmet direct dependencies (NET && CAN && CAN_DEV && HAS_IOMEM)

and then this is what happens due to that kconfig problem:

ERROR: "register_candev" [drivers/net/can/softing/softing.ko] undefined!
ERROR: "alloc_candev" [drivers/net/can/softing/softing.ko] undefined!
ERROR: "can_bus_off" [drivers/net/can/softing/softing.ko] undefined!
ERROR: "close_candev" [drivers/net/can/softing/softing.ko] undefined!
ERROR: "free_candev" [drivers/net/can/softing/softing.ko] undefined!
ERROR: "unregister_candev" [drivers/net/can/softing/softing.ko] undefined!
ERROR: "alloc_can_skb" [drivers/net/can/softing/softing.ko] undefined!
ERROR: "open_candev" [drivers/net/can/softing/softing.ko] undefined!

with this partial config:

CONFIG_CAN=m
# CONFIG_CAN_RAW is not set
# CONFIG_CAN_BCM is not set
# CAN Device Drivers
# CONFIG_CAN_VCAN is not set
CONFIG_CAN_SLCAN=m
# CONFIG_CAN_DEV is not set
CONFIG_CAN_SOFTING=m
CONFIG_CAN_SOFTING_CS=m
# CONFIG_CAN_DEBUG_DEVICES is not set

Signed-off-by: Randy Dunlap <redacted>
Cc: Kurt Van Dijck <redacted>
---
 drivers/net/can/softing/Kconfig |    1 +
 1 file changed, 1 insertion(+)
--- mmotm-2011-0210-1626.orig/drivers/net/can/softing/Kconfig
+++ mmotm-2011-0210-1626/drivers/net/can/softing/Kconfig
@@ -18,6 +18,7 @@ config CAN_SOFTING
 config CAN_SOFTING_CS
 	tristate "Softing Gmbh CAN pcmcia cards"
 	depends on PCMCIA
+	depends on CAN_DEV && HAS_IOMEM
 	select CAN_SOFTING
 	---help---
 	  Support for PCMCIA cards from Softing Gmbh & some cards

Re: [PATCH -next/mmotm] net/can: fix softing build errors

From: Kurt Van Dijck <hidden>
Date: 2011-02-12 11:15:29

On Fri, Feb 11, 2011 at 10:33:12PM -0800, Randy Dunlap wrote:
warning: (CAN_SOFTING_CS) selects CAN_SOFTING which has unmet direct dependencies (NET && CAN && CAN_DEV && HAS_IOMEM)

with this partial config:

CONFIG_CAN=m
# CONFIG_CAN_RAW is not set
# CONFIG_CAN_BCM is not set
# CAN Device Drivers
# CONFIG_CAN_VCAN is not set
CONFIG_CAN_SLCAN=m
# CONFIG_CAN_DEV is not set
CONFIG_CAN_SOFTING=m
CONFIG_CAN_SOFTING_CS=m
# CONFIG_CAN_DEBUG_DEVICES is not set
I understand the output, but I don't understand the cause well enough.
CAN_SOFTING=m has a 'depends on CAN_DEV'
Is it then possible to have CAN_SOFTING=m _and not_ CAN_DEV ?
regards,
Kurt

Re: [PATCH -next/mmotm] net/can: fix softing build errors

From: Randy Dunlap <hidden>
Date: 2011-02-12 16:04:08

On 02/12/11 03:15, Kurt Van Dijck wrote:
On Fri, Feb 11, 2011 at 10:33:12PM -0800, Randy Dunlap wrote:
quoted
warning: (CAN_SOFTING_CS) selects CAN_SOFTING which has unmet direct dependencies (NET && CAN && CAN_DEV && HAS_IOMEM)

with this partial config:

CONFIG_CAN=m
# CONFIG_CAN_RAW is not set
# CONFIG_CAN_BCM is not set
# CAN Device Drivers
# CONFIG_CAN_VCAN is not set
CONFIG_CAN_SLCAN=m
# CONFIG_CAN_DEV is not set
CONFIG_CAN_SOFTING=m
CONFIG_CAN_SOFTING_CS=m
# CONFIG_CAN_DEBUG_DEVICES is not set
I understand the output, but I don't understand the cause well enough.
CAN_SOFTING=m has a 'depends on CAN_DEV'
Is it then possible to have CAN_SOFTING=m _and not_ CAN_DEV ?
Yes.  From Documentation/kbuild/kconfig-language.txt:

  Note:
	select should be used with care. select will force
	a symbol to a value without visiting the dependencies.
	By abusing select you are able to select a symbol FOO even
	if FOO depends on BAR that is not set.
	In general use select only for non-visible symbols
	(no prompts anywhere) and for symbols with no dependencies.
	That will limit the usefulness but on the other hand avoid
	the illegal configurations all over.


CAN_SOFTING_CS does not depend on CAN_DEV. but it selects CAN_SOFTING,
which does depend on CAN_DEV, ... but CAN_DEV is not enabled.


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

Re: [PATCH -next/mmotm] net/can: fix softing build errors

From: Kurt Van Dijck <hidden>
Date: 2011-02-13 13:37:29

On Sat, Feb 12, 2011 at 08:02:42AM -0800, Randy Dunlap wrote:
On 02/12/11 03:15, Kurt Van Dijck wrote:
quoted
On Fri, Feb 11, 2011 at 10:33:12PM -0800, Randy Dunlap wrote:
quoted
warning: (CAN_SOFTING_CS) selects CAN_SOFTING which has unmet direct dependencies (NET && CAN && CAN_DEV && HAS_IOMEM)

with this partial config:

CONFIG_CAN=m
# CONFIG_CAN_RAW is not set
# CONFIG_CAN_BCM is not set
# CAN Device Drivers
# CONFIG_CAN_VCAN is not set
CONFIG_CAN_SLCAN=m
# CONFIG_CAN_DEV is not set
CONFIG_CAN_SOFTING=m
CONFIG_CAN_SOFTING_CS=m
# CONFIG_CAN_DEBUG_DEVICES is not set
I understand the output, but I don't understand the cause well enough.
CAN_SOFTING=m has a 'depends on CAN_DEV'
Is it then possible to have CAN_SOFTING=m _and not_ CAN_DEV ?
Yes.  From Documentation/kbuild/kconfig-language.txt:
I see.
The 'select CAN_SOFTING' was introduced because it makes no sense to
have CAN_SOFTING_CS alone 'for a normal user', although there is no
real dependency.
Is a 'select' then still a good option, since it feels like repeating
all dependencies from CAN_SOFTING in CAN_SOFTING_CS?
What about this?
diff --git a/drivers/net/can/softing/Kconfig b/drivers/net/can/softing/Kconfig
index 92bd6bd..55dd3e4 100644
--- a/drivers/net/can/softing/Kconfig
+++ b/drivers/net/can/softing/Kconfig
@@ -18,7 +18,7 @@ config CAN_SOFTING
 config CAN_SOFTING_CS
 	tristate "Softing Gmbh CAN pcmcia cards"
 	depends on PCMCIA
-	select CAN_SOFTING
+	depends on CAN_SOFTING
 	---help---
 	  Support for PCMCIA cards from Softing Gmbh & some cards
 	  from Vector Gmbh.
---
It will present the Softing stuff in Kconfig as if CAN_SOFTING_CS really
depends on CAN_SOFTING, which is acceptible from a users perspective.

Kurt

Re: [PATCH -next/mmotm] net/can: fix softing build errors

From: Randy Dunlap <hidden>
Date: 2011-02-13 16:02:30

On 02/13/11 05:37, Kurt Van Dijck wrote:
quoted hunk
On Sat, Feb 12, 2011 at 08:02:42AM -0800, Randy Dunlap wrote:
quoted
On 02/12/11 03:15, Kurt Van Dijck wrote:
quoted
On Fri, Feb 11, 2011 at 10:33:12PM -0800, Randy Dunlap wrote:
quoted
warning: (CAN_SOFTING_CS) selects CAN_SOFTING which has unmet direct dependencies (NET && CAN && CAN_DEV && HAS_IOMEM)

with this partial config:

CONFIG_CAN=m
# CONFIG_CAN_RAW is not set
# CONFIG_CAN_BCM is not set
# CAN Device Drivers
# CONFIG_CAN_VCAN is not set
CONFIG_CAN_SLCAN=m
# CONFIG_CAN_DEV is not set
CONFIG_CAN_SOFTING=m
CONFIG_CAN_SOFTING_CS=m
# CONFIG_CAN_DEBUG_DEVICES is not set
I understand the output, but I don't understand the cause well enough.
CAN_SOFTING=m has a 'depends on CAN_DEV'
Is it then possible to have CAN_SOFTING=m _and not_ CAN_DEV ?
Yes.  From Documentation/kbuild/kconfig-language.txt:
I see.
The 'select CAN_SOFTING' was introduced because it makes no sense to
have CAN_SOFTING_CS alone 'for a normal user', although there is no
real dependency.
Is a 'select' then still a good option, since it feels like repeating
all dependencies from CAN_SOFTING in CAN_SOFTING_CS?
What about this?
diff --git a/drivers/net/can/softing/Kconfig b/drivers/net/can/softing/Kconfig
index 92bd6bd..55dd3e4 100644
--- a/drivers/net/can/softing/Kconfig
+++ b/drivers/net/can/softing/Kconfig
@@ -18,7 +18,7 @@ config CAN_SOFTING
 config CAN_SOFTING_CS
 	tristate "Softing Gmbh CAN pcmcia cards"
 	depends on PCMCIA
-	select CAN_SOFTING
+	depends on CAN_SOFTING
 	---help---
 	  Support for PCMCIA cards from Softing Gmbh & some cards
 	  from Vector Gmbh.
---
It will present the Softing stuff in Kconfig as if CAN_SOFTING_CS really
depends on CAN_SOFTING, which is acceptible from a users perspective.
That's fine.
Acked-by: Randy Dunlap <redacted>

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

Re: [PATCH -next/mmotm] net/can: fix softing build errors

From: David Miller <davem@davemloft.net>
Date: 2011-02-13 18:38:15

From: Randy Dunlap <redacted>
Date: Sun, 13 Feb 2011 08:01:14 -0800
On 02/13/11 05:37, Kurt Van Dijck wrote:
quoted
The 'select CAN_SOFTING' was introduced because it makes no sense to
have CAN_SOFTING_CS alone 'for a normal user', although there is no
real dependency.
Is a 'select' then still a good option, since it feels like repeating
all dependencies from CAN_SOFTING in CAN_SOFTING_CS?
What about this?
diff --git a/drivers/net/can/softing/Kconfig b/drivers/net/can/softing/Kconfig
index 92bd6bd..55dd3e4 100644
--- a/drivers/net/can/softing/Kconfig
+++ b/drivers/net/can/softing/Kconfig
@@ -18,7 +18,7 @@ config CAN_SOFTING
 config CAN_SOFTING_CS
 	tristate "Softing Gmbh CAN pcmcia cards"
 	depends on PCMCIA
-	select CAN_SOFTING
+	depends on CAN_SOFTING
 	---help---
 	  Support for PCMCIA cards from Softing Gmbh & some cards
 	  from Vector Gmbh.
---
It will present the Softing stuff in Kconfig as if CAN_SOFTING_CS really
depends on CAN_SOFTING, which is acceptible from a users perspective.
That's fine.
Acked-by: Randy Dunlap <redacted>
Kurt, please formally re-submit this with a proper commit message,
a signoff for you, and Randy's ACK.

Thanks.

[PATCH] net/can/softing: make CAN_SOFTING_CS depend on CAN_SOFTING

From: Kurt Van Dijck <hidden>
Date: 2011-02-14 07:55:17

The statement 'select CAN_SOFTING' may ignore the dependancies
for CAN_SOFTING while selecting CAN_SOFTING_CS, as is therefore a bad choice.

Signed-off-by: Kurt Van Dijck <redacted>
Acked-by: Randy Dunlap <redacted>
---
diff --git a/drivers/net/can/softing/Kconfig b/drivers/net/can/softing/Kconfig
index 92bd6bd..55dd3e4 100644
--- a/drivers/net/can/softing/Kconfig
+++ b/drivers/net/can/softing/Kconfig
@@ -18,7 +18,7 @@ config CAN_SOFTING
 config CAN_SOFTING_CS
 	tristate "Softing Gmbh CAN pcmcia cards"
 	depends on PCMCIA
-	select CAN_SOFTING
+	depends on CAN_SOFTING
 	---help---
 	  Support for PCMCIA cards from Softing Gmbh & some cards
 	  from Vector Gmbh.

Re: [PATCH] net/can/softing: make CAN_SOFTING_CS depend on CAN_SOFTING

From: David Miller <davem@davemloft.net>
Date: 2011-02-14 19:43:49

From: Kurt Van Dijck <redacted>
Date: Mon, 14 Feb 2011 08:55:07 +0100
The statement 'select CAN_SOFTING' may ignore the dependancies
for CAN_SOFTING while selecting CAN_SOFTING_CS, as is therefore a bad choice.

Signed-off-by: Kurt Van Dijck <redacted>
Acked-by: Randy Dunlap <redacted>
Applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help