[PATCH 10/12] hrtimer: Mark index and clockid of clock base as const

From: Thomas Weißschuh (Schneider Electric)

Date: Wed Mar 11 2026 - 06:19:45 EST


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@xxxxxxxxxxxxx>
---
include/linux/hrtimer_defs.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/hrtimer_defs.h b/include/linux/hrtimer_defs.h
index e6d4dc1b61e0..a03240c0b14f 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;

--
2.53.0