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