Skip to contentSkip to conversation

can: fix build dependency

PATCH In review Marc Kleine-Budde 2 participants 3 messages Dec 17, 2025 – Dec 18, 2025 CAN network drivers

lore
Share & tools
lore

Marc Kleine-Budde

author maintainer
#0 lore raw

PATCH 1/1 can: fix build dependency

Arnd Bergmann's patch [1] fixed the build dependency problem introduced by bugfix commit cb2dc6d2869a ("can: Kconfig: select CAN driver infrastructure by default"). This ended up as commit 6abd4577bccc ("can: fix build dependency"), but I broke Arnd's fix by removing a dependency that we thought was superfluous.

[1] https://lore.kernel.org/all/[email protected]/

Meanwhile the problem was also found by intel's kernel test robot, complaining about undefined symbols:

| ERROR: modpost: "m_can_class_unregister" [drivers/net/can/m_can/m_can_platform.ko] undefined!
| ERROR: modpost: "m_can_class_free_dev" [drivers/net/can/m_can/m_can_platform.ko] undefined!
| ERROR: modpost: "m_can_class_allocate_dev" [drivers/net/can/m_can/m_can_platform.ko] undefined!
| ERROR: modpost: "m_can_class_get_clocks" [drivers/net/can/m_can/m_can_platform.ko] undefined!
| ERROR: modpost: "m_can_class_register" [drivers/net/can/m_can/m_can_platform.ko] undefined!

To fix this problem, add the missing dependency again.

Cc Vincent Mailhol <[email protected]>
Fixes 6abd4577bccc ("can: fix build dependency")
Fixes cb2dc6d2869a ("can: Kconfig: select CAN driver infrastructure by default")
---
 drivers/net/can/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/can/Kconfig +1 -1
index 460a74ae6923..cfaea6178a71 100644
@@ -17,7 +17,7 @@ menuconfig CAN_DEV
 	  virtual ones. If you own such devices or plan to use the virtual CAN
 	  interfaces to develop applications, say Y here.
 
-if CAN_DEV
+if CAN_DEV && CAN
 
 config CAN_VCAN
 	tristate "Virtual Local CAN Interface (vcan)"

---
base-commit: 885bebac9909994050bbbeed0829c727e42bd1b7
change-id: 20251217-can-fix-dependency-63155d8db12d

Best regards,

Signature · 1 line
Marc Kleine-Budde <[email protected]>
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Marc Kleine-Budde

Arnd Bergmann's patch [1] fixed the build dependency problem introduced by bugfix commit cb2dc6d2869a ("can: Kconfig: select CAN driver infrastructure by default"). This ended up as commit 6abd4577bccc ("can: fix build dependency"), but I broke Arnd's fix by removing a dependency that we thought was superfluous.

And my comment subverted you into doing so. I think half of the blame goes to me here.

Quoted 13 lines

[1] https://lore.kernel.org/all/[email protected]/

Meanwhile the problem was also found by intel's kernel test robot, complaining about undefined symbols:

| ERROR: modpost: "m_can_class_unregister" [drivers/net/can/m_can/m_can_platform.ko] undefined!
| ERROR: modpost: "m_can_class_free_dev" [drivers/net/can/m_can/m_can_platform.ko] undefined!
| ERROR: modpost: "m_can_class_allocate_dev" [drivers/net/can/m_can/m_can_platform.ko] undefined!
| ERROR: modpost: "m_can_class_get_clocks" [drivers/net/can/m_can/m_can_platform.ko] undefined!
| ERROR: modpost: "m_can_class_register" [drivers/net/can/m_can/m_can_platform.ko] undefined!

To fix this problem, add the missing dependency again.

Quoted 8 lines
Cc Vincent Mailhol <[email protected]>
Fixes 6abd4577bccc ("can: fix build dependency")
Fixes cb2dc6d2869a ("can: Kconfig: select CAN driver infrastructure by default")

Yours sincerely,
Vincent Mailhol

author maintainer
#2 lore raw
Quoted 9 lines · Vincent Mailhol
Quoted 5 lines · Marc Kleine-Budde

Arnd Bergmann's patch [1] fixed the build dependency problem introduced by bugfix commit cb2dc6d2869a ("can: Kconfig: select CAN driver infrastructure by default"). This ended up as commit 6abd4577bccc ("can: fix build dependency"), but I broke Arnd's fix by removing a dependency that we thought was superfluous.

And my comment subverted you into doing so. I think half of the blame goes to me here.

:)

Quoted 22 lines
Quoted 13 lines

[1] https://lore.kernel.org/all/[email protected]/

Meanwhile the problem was also found by intel's kernel test robot, complaining about undefined symbols:

| ERROR: modpost: "m_can_class_unregister" [drivers/net/can/m_can/m_can_platform.ko] undefined!
| ERROR: modpost: "m_can_class_free_dev" [drivers/net/can/m_can/m_can_platform.ko] undefined!
| ERROR: modpost: "m_can_class_allocate_dev" [drivers/net/can/m_can/m_can_platform.ko] undefined!
| ERROR: modpost: "m_can_class_get_clocks" [drivers/net/can/m_can/m_can_platform.ko] undefined!
| ERROR: modpost: "m_can_class_register" [drivers/net/can/m_can/m_can_platform.ko] undefined!

To fix this problem, add the missing dependency again.

Quoted 8 lines
Cc Vincent Mailhol <[email protected]>
Fixes 6abd4577bccc ("can: fix build dependency")
Fixes cb2dc6d2869a ("can: Kconfig: select CAN driver infrastructure by default")
Quoted 1 line

Thanks,
Marc

Signature · 4 lines
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |