[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a22aSbpcVK-cZ6rhnPgbYEGU3z__G9xk1EexOPZd5Hmzw@mail.gmail.com>
Date: Mon, 20 Apr 2020 23:42:16 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Richard Cochran <richardcochran@...il.com>
Cc: Clay McClure <clay@...mons.net>,
Grygorii Strashko <grygorii.strashko@...com>,
"David S. Miller" <davem@...emloft.net>,
Sekhar Nori <nsekhar@...com>,
Networking <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: cpts: Condition WARN_ON on PTP_1588_CLOCK
On Mon, Apr 20, 2020 at 11:34 PM Richard Cochran
<richardcochran@...il.com> wrote:
>
> On Mon, Apr 20, 2020 at 11:21:20PM +0200, Arnd Bergmann wrote:
> > It's not great, but we have other interfaces like this that can return NULL for
> > success when the subsystem is disabled. The problem is when there is
> > a mismatch between the caller treating NULL as failure when it is meant to
> > be "successful lack of object returned".
>
> Yeah, that should be fixed.
>
> To be clear, do you all see a need to change the stubbed version of
> ptp_clock_register() or not?
No, if the NULL return is only meant to mean "nothing wrong, keep going
wihtout an object", that's fine with me. It does occasionally confuse driver
writers (as seen here), so it's not a great interface, but there is no general
solution to make it better.
Arnd
Powered by blists - more mailing lists