Skip to content

Commit 6abd457

Browse files
arndbmarckleinebudde
authored andcommitted
can: fix build dependency
A recent bugfix introduced a new problem with Kconfig dependencies: WARNING: unmet direct dependencies detected for CAN_DEV Depends on [n]: NETDEVICES [=n] && CAN [=m] Selected by [m]: - CAN [=m] && NET [=y] Since the CAN core code now links into the CAN device code, that particular function needs to be available, though the rest of it does not. Revert the incomplete fix and instead use Makefile logic to avoid the link failure. Fixes: cb2dc6d ("can: Kconfig: select CAN driver infrastructure by default") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202512091523.zty3CLmc-lkp@intel.com/ Signed-off-by: Arnd Bergmann <arnd@arndb.de> Tested-by: Oliver Hartkopp <socketcan@hartkopp.net> Acked-by: Oliver Hartkopp <socketcan@hartkopp.net> Link: https://patch.msgid.link/20251204100015.1033688-1-arnd@kernel.org [mkl: removed module option from CAN_DEV help text (thanks Vincent)] [mkl: removed '&& CAN' from Kconfig dependency (thanks Vincent)] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
1 parent 186468c commit 6abd457

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

drivers/net/can/Kconfig

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22

33
menuconfig CAN_DEV
4-
tristate "CAN Device Drivers"
4+
bool "CAN Device Drivers"
55
default y
66
depends on CAN
77
help
@@ -17,9 +17,6 @@ menuconfig CAN_DEV
1717
virtual ones. If you own such devices or plan to use the virtual CAN
1818
interfaces to develop applications, say Y here.
1919

20-
To compile as a module, choose M here: the module will be called
21-
can-dev.
22-
2320
if CAN_DEV
2421

2522
config CAN_VCAN

drivers/net/can/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ obj-$(CONFIG_CAN_VCAN) += vcan.o
77
obj-$(CONFIG_CAN_VXCAN) += vxcan.o
88
obj-$(CONFIG_CAN_SLCAN) += slcan/
99

10-
obj-y += dev/
10+
obj-$(CONFIG_CAN_DEV) += dev/
1111
obj-y += esd/
1212
obj-y += rcar/
1313
obj-y += rockchip/

drivers/net/can/dev/Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# SPDX-License-Identifier: GPL-2.0
22

3-
obj-$(CONFIG_CAN_DEV) += can-dev.o
4-
5-
can-dev-y += skb.o
3+
obj-$(CONFIG_CAN) += can-dev.o
64

5+
can-dev-$(CONFIG_CAN_DEV) += skb.o
76
can-dev-$(CONFIG_CAN_CALC_BITTIMING) += calc_bittiming.o
87
can-dev-$(CONFIG_CAN_NETLINK) += bittiming.o
98
can-dev-$(CONFIG_CAN_NETLINK) += dev.o

net/can/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
menuconfig CAN
77
tristate "CAN bus subsystem support"
8-
select CAN_DEV
98
help
109
Controller Area Network (CAN) is a slow (up to 1Mbit/s) serial
1110
communications protocol. Development of the CAN bus started in

0 commit comments

Comments
 (0)