Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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) <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260311-hrtimer-cleanups-v1-10-095357392669@linutronix.de

authored by

Thomas Weißschuh (Schneider Electric) and committed by
Thomas Gleixner
f12ef5cb bd803783

+2 -2
+2 -2
include/linux/hrtimer_defs.h
··· 26 26 */ 27 27 struct hrtimer_clock_base { 28 28 struct hrtimer_cpu_base *cpu_base; 29 - unsigned int index; 30 - clockid_t clockid; 29 + const unsigned int index; 30 + const clockid_t clockid; 31 31 seqcount_raw_spinlock_t seq; 32 32 ktime_t expires_next; 33 33 struct hrtimer *running;