]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ptp: Split out PTP_CLOCK_GETCAPS ioctl code
authorThomas Gleixner <tglx@linutronix.de>
Wed, 25 Jun 2025 11:52:24 +0000 (13:52 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 27 Jun 2025 00:54:03 +0000 (17:54 -0700)
commit7ca2ac4953fd191929c5467a2176fcf9e280542f
treeb7c4fd5f553c2957c01ce5845fd1700322f74354
parentb7863babce0a7aacb252e50d75b192476aa81ea1
ptp: Split out PTP_CLOCK_GETCAPS ioctl code

ptp_ioctl() is an inpenetrable letter soup with a gazillion of case (scope)
specific variables defined at the top of the function and pointless breaks
and gotos.

Start cleaning it up by splitting out the PTP_CLOCK_GETCAPS ioctl code into
a helper function. Use a argument pointer with a single sparse compliant
type cast instead of proliferating the type cast all over the place.

No functional change intended.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Link: https://patch.msgid.link/20250625115132.733409073@linutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/ptp/ptp_chardev.c