[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201114151410.GA24250@hoboy.vegasvil.org>
Date: Sat, 14 Nov 2020 07:14:10 -0800
From: Richard Cochran <richardcochran@...il.com>
To: Arnd Bergmann <arnd@...nel.org>
Cc: 王擎 <wangqing@...o.com>,
Jakub Kicinski <kuba@...nel.org>,
Grygorii Strashko <grygorii.strashko@...com>,
"David S. Miller" <davem@...emloft.net>,
Samuel Zou <zou_wei@...wei.com>,
Kurt Kanzenbach <kurt@...utronix.de>,
Ivan Khoronzhuk <ivan.khoronzhuk@...aro.org>,
Networking <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: 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
Powered by blists - more mailing lists