Re: [PATCH net-next v4] ethernet: fix PTP_1588_CLOCK dependencies

From: Arnd Bergmann
Date: Thu Aug 05 2021 - 10:10:38 EST


On Thu, Aug 5, 2021 at 3:32 PM Vladimir Oltean <olteanv@xxxxxxxxx> wrote:
> >
> > # Users should depend on NET_SWITCHDEV, HAS_IOMEM, BRIDGE
> > config MSCC_OCELOT_SWITCH_LIB
> > + depends on PTP_1588_CLOCK_OPTIONAL
>
> No, don't make the MSCC_OCELOT_SWITCH_LIB depend on anything please,
> since it is always "select"-ed, it shouldn't have dependencies, see
> the comment above. If you want, add this to the comment: "Users should
> depend on (...), PTP_1588_CLOCK_OPTIONAL".
>

Changed now, but I only saw your message after I had already sent out v5 of
the patch. I'll hold off on sending v6 for the moment, in case someone else
notices something odd.

I generally prefer having the extra dependencies like this, because it documents
what the requirement is, and causes a config-time warning before the kernel
runs into a link failure when someone else gets the dependency wrong later.
I don't feel too strongly about it though, and I don't expect adding a comment
would help much either here, so I'm leaving it without that line.

Arnd