Re: [PATCH v4 3/7] can: bittiming: move bittiming calculation functions to calc_bittiming.c
From: Marc Kleine-Budde
Date: Sat Jun 04 2022 - 09:53:06 EST
On 04.06.2022 21:56:23, Vincent MAILHOL wrote:
> > I was thinking to order by CONFIG symbol and put the objects without an
> > additional symbol first
> >
> > > By sorting the list, do literally mean to sort each line like this:
> > >
> > > obj-$(CONFIG_CAN_DEV) += can-dev.o
> > > can-dev-$(CONFIG_CAN_CALC_BITTIMING) += calc_bittiming.o
> > > can-dev-$(CONFIG_CAN_DEV) += skb.o
> > > can-dev-$(CONFIG_CAN_NETLINK) += bittiming.o
> > > can-dev-$(CONFIG_CAN_NETLINK) += dev.o
> > > can-dev-$(CONFIG_CAN_NETLINK) += length.o
> > > can-dev-$(CONFIG_CAN_NETLINK) += netlink.o
> > > can-dev-$(CONFIG_CAN_RX_OFFLOAD) += rx-offload.o
> >
> > ...which results in:
> >
> > obj-$(CONFIG_CAN_DEV) += can-dev.o
> >
> > can-dev-y += skb.o
>
> I see. But this contradicts the idea to do
> | obj-y += can-dev
> as suggested in:
> https://lore.kernel.org/linux-can/20220604112707.z4zjdjydqy5rkyfe@xxxxxxxxxxxxxx/
Doh! That mail was totally wrong - I've send an updated version.
> So, we have to choose between:
> | obj-$(CONFIG_CAN_DEV) += can-dev.o
> |
> | can-dev-y += skb.o
> |
> | can-dev-$(CONFIG_CAN_CALC_BITTIMING) += calc_bittiming.o
> | (...)
+1
> or:
>
> | obj-y += can-dev.o
> |
> | can-dev-$(CONFIG_CAN_CALC_BITTIMING) += calc_bittiming.o
> | can-dev-$(CONFIG_CAN_DEV) += skb.o
> | (...)
>
> I have a slight preference for the second, but again, wouldn't mind to
> select the first one.
I think if can-dev is added to "obj-y" it will be always complied into
the kernel. It will not be a module, if CONFIG_CAN_DEV configured as a
module (which results in $(CONFIG_CAN_DEV) evaluate to "m").
Sorry for the confusion!
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Attachment:
signature.asc
Description: PGP signature