]> www.infradead.org Git - users/jedix/linux-maple.git/commit
timekeeping: Simplify code in timekeeping_advance()
authorThomas Gleixner <tglx@linutronix.de>
Wed, 9 Oct 2024 08:28:58 +0000 (10:28 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 25 Oct 2024 17:49:13 +0000 (19:49 +0200)
commitc2a329566a3d5a638061733f232c40379235931d
tree2353907b12f6fb6815910e5b8a982e345e89ea3d
parent1f7226b1e70a0e2ca3b305808cc7f1ae3acbd127
timekeeping: Simplify code in timekeeping_advance()

timekeeping_advance() takes the timekeeper_lock and releases it before
returning. When an early return is required, goto statements are used to
make sure the lock is realeased properly. When the code was written the
locking guard() was not yet available.

Use the guard() to simplify the code and while at it cleanup ordering of
function variables. No functional change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: John Stultz <jstultz@google.com>
Link: https://lore.kernel.org/all/20241009-devel-anna-maria-b4-timers-ptp-timekeeping-v2-5-554456a44a15@linutronix.de
kernel/time/timekeeping.c