lkml.org 
[lkml]   [2020]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Re: [PATCH V4 net-bugfixs] net/ethernet: Update ret when ptp_clock is ERROR
On Fri, Nov 13, 2020 at 05:21:43PM +0100, Arnd Bergmann wrote:
> I've prototyped a patch that I think makes this more sensible
> again: https://pastebin.com/AQ5nWS9e

I like the behavior described in the text.

Instead of this ...

- if a built-in driver calls PTP interface functions but fails
to select HAVE_PTP_1588_CLOCK or depend on PTP_1588_CLOCK,
and PTP support is a loadable module, we get a link error
instead of having an unusable clock.

how about simply deleting the #else clause of

--- a/include/linux/ptp_clock_kernel.h
+++ b/include/linux/ptp_clock_kernel.h
@@ -173,7 +173,7 @@ struct ptp_clock_event {
};
};

-#if IS_REACHABLE(CONFIG_PTP_1588_CLOCK)
+#if IS_ENABLED(CONFIG_PTP_1588_CLOCK)

so that invalid configurations throw a compile time error instead?

Thanks,
Richard
\
 
 \ /
  Last update: 2020-11-14 16:15    [W:0.059 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site