Re: [PATCH] net: Select PTP_1588_CLOCK in PTP-specific drivers

From: Clay McClure
Date: Wed Apr 29 2020 - 03:30:11 EST


On Tue, Apr 28, 2020 at 06:07:45PM +0200, Arnd Bergmann wrote:
> On Tue, Apr 28, 2020 at 11:21 AM Geert Uytterhoeven
> <geert@xxxxxxxxxxxxxx> wrote:
> > On Tue, Apr 28, 2020 at 11:14 AM Clay McClure <clay@xxxxxxxxxxx> wrote:
> > > Change these drivers back [2] to `select PTP_1588_CLOCK`. Note that this
> > > requires also selecting POSIX_TIMERS, a transitive dependency of
> > > PTP_1588_CLOCK.
> >
> > If these drivers have a hard dependency on PTP_1588_CLOCK, IMHO they
> > should depend on PTP_1588_CLOCK, not select PTP_1588_CLOCK.
>
> Agreed.

Thanks for reviewing the patch. I'll post v2 using `depends on` shortly.

> Note that for drivers that only optionally use the PTP_1588_CLOCK
> support, we probably want 'depends on PTP_1588_CLOCK ||
> !PTP_1588_CLOCK' (or the syntax replacing it eventually), to avoid the
> case where a built-in driver fails to use a modular ptp implementation.

I see some drivers are starting to do just that, e.g.:

commit 96c34151d157 ("net/mlx5: Kconfig: convert imply usage to weak dependency")

I can post a patch this weekend converting the rest of the drivers.

--
Clay