From: Thomas Weißschuh (Schneider Electric) Date: Wed, 11 Mar 2026 10:15:19 +0000 (+0100) Subject: hrtimer: Mark index and clockid of clock base as const X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f12ef5cb4e035e15f0c324c41ff402441578ffda;p=thirdparty%2Fkernel%2Flinux.git hrtimer: Mark index and clockid of clock base as const These fields are initialized once and are never supposed to change. Mark them as const to make this explicit. Signed-off-by: Thomas Weißschuh (Schneider Electric) Signed-off-by: Thomas Gleixner Link: https://patch.msgid.link/20260311-hrtimer-cleanups-v1-10-095357392669@linutronix.de --- diff --git a/include/linux/hrtimer_defs.h b/include/linux/hrtimer_defs.h index e6d4dc1b61e0f..a03240c0b14f8 100644 --- a/include/linux/hrtimer_defs.h +++ b/include/linux/hrtimer_defs.h @@ -26,8 +26,8 @@ */ struct hrtimer_clock_base { struct hrtimer_cpu_base *cpu_base; - unsigned int index; - clockid_t clockid; + const unsigned int index; + const clockid_t clockid; seqcount_raw_spinlock_t seq; ktime_t expires_next; struct hrtimer *running;