From: Richard Cochran <richardcochran@gmail.com>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
John Stultz <john.stultz@linaro.org>,
Arnd Bergmann <arnd@arndb.de>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH RESEND net] ptp: Ensure info->enable callback is always set
Date: Thu, 23 Jan 2025 07:11:07 -0800 [thread overview]
Message-ID: <Z5JcCxGuQNH9bZYH@hoboy.vegasvil.org> (raw)
In-Reply-To: <779708b6-d61c-4688-92cc-6afb987334d6@t-8ch.de>
On Thu, Jan 23, 2025 at 02:19:46PM +0100, Thomas Weißschuh wrote:
> On 2025-01-23 10:38:37+0100, Michal Swiatkowski wrote:
> > What about other ops, did you check it too? Looks like it isn't needed,
> > but it sometimes hard to follow.
>
> I couldn't find any missing, but I'm not familiar with the subsystem and
> didn't check too hard.
Initially all of the callbacks were required, but that requirement
became relaxed over time with getcycles64().
Now that we have more and more drivers, it wouldn't hurt to let
ptp_clock_register() check that the needed callbacks are valid.
> Note:
>
> A follow-up fix would be to actually guard the users of ->enable and
> error out.
Yes, I would place checks at the call sites, within ptp_ioctl().
Thanks,
Richard
next prev parent reply other threads:[~2025-01-23 15:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-23 7:22 Thomas Weißschuh
2025-01-23 9:38 ` Michal Swiatkowski
2025-01-23 13:19 ` Thomas Weißschuh
2025-01-23 15:11 ` Richard Cochran [this message]
2025-01-27 22:40 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z5JcCxGuQNH9bZYH@hoboy.vegasvil.org \
--to=richardcochran@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=john.stultz@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=michal.swiatkowski@linux.intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®