Re: [PATCH] net: can: fix build dependency

From: Marc Kleine-Budde
Date: Wed Dec 10 2025 - 04:40:29 EST


On 10.12.2025 10:10:27, Arnd Bergmann wrote:
> On Wed, Dec 10, 2025, at 09:16, Marc Kleine-Budde wrote:
> > On 05.12.2025 00:30:14, Vincent Mailhol wrote:
>
> >> > can-dev.> -if CAN_DEV
> >> > +if CAN_DEV && CAN
> >> ^^^^^^
> >> Is this needed? CAN_DEV depends on CAN, so the condition
> >>
> >> CAN_DEV && !CAN
> >>
> >> should not be reachable.
> >
> > Removed the '&& CAN' while applying the patch.
>
> Sorry I forgot to reply here: the '&& CAN' is absolutely
> required here, otherwise you can configure CAN device drivers
> as built-in with CAN_DEV=y CAN=m, and that results in a
> link failure.

You mean:

| $ grep ^CONFIG_CAN .config
| CONFIG_CAN=m
| CONFIG_CAN_RAW=m
| CONFIG_CAN_BCM=m
| CONFIG_CAN_GW=m
| CONFIG_CAN_DEV=y
| CONFIG_CAN_VXCAN=y
| CONFIG_CAN_NETLINK=y
| CONFIG_CAN_CALC_BITTIMING=y
| CONFIG_CAN_RX_OFFLOAD=y
| CONFIG_CAN_DUMMY=y
| CONFIG_CAN_GS_USB=y

...which works for me.

regards,
Marc

--
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 |

Attachment: signature.asc
Description: PGP signature