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(+)
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 ?
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 ***
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?
---
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
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?
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?
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>
---
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>