Thread (18 messages) flat view 18 messages, 5 authors, 2020-11-14

Re: Re: [PATCH V4 net-bugfixs] net/ethernet: Update ret when ptp_clock is ERROR

From: Richard Cochran <richardcochran@gmail.com>
Date: 2020-11-14 15:15:35
Also in: lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help