From: Jakub Kicinski Date: Fri, 27 Jun 2025 00:54:10 +0000 (-0700) Subject: Merge branch 'ptp-belated-spring-cleaning-of-the-chardev-driver' X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ea2e106130adc3e3424dd0607b72847313d2367;p=thirdparty%2Fkernel%2Fstable.git Merge branch 'ptp-belated-spring-cleaning-of-the-chardev-driver' Thomas Gleixner says: ==================== ptp: Belated spring cleaning of the chardev driver When looking into supporting auxiliary clocks in the PTP ioctl, the inpenetrable ptp_ioctl() letter soup bothered me enough to clean it up. The code (~400 lines!) is really hard to follow due to a gazillion of local variables, which are only used in certain case scopes, and a mixture of gotos, breaks and direct error return paths. Clean it up by splitting out the IOCTL functionality into seperate functions, which contain only the required local variables and are trivial to follow. Complete the cleanup by converting the code to lock guards and get rid of all gotos. That reduces the code size by 48 lines and also the binary text size is 80 bytes smaller than the current maze. The series is split up into one patch per IOCTL command group for easy review. v1: https://lore.kernel.org/20250620130144.351492917@linutronix.de ==================== Link: https://patch.msgid.link/20250625114404.102196103@linutronix.de Signed-off-by: Jakub Kicinski --- 1ea2e106130adc3e3424dd0607b72847313d2367