From fab0379bb60d6e177018b53f07718b69ba34948d Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Sun, 29 May 2022 13:32:11 -0500 Subject: lib: utils/fdt: Require match data to be const Match data stores hardware attributes which do not change at runtime, so it does not need to be mutable. Make it const. Reviewed-by: Guo Ren Reviewed-by: Xiang W Reviewed-by: Anup Patel Signed-off-by: Samuel Holland --- lib/utils/timer/fdt_timer_mtimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/utils/timer/fdt_timer_mtimer.c') diff --git a/lib/utils/timer/fdt_timer_mtimer.c b/lib/utils/timer/fdt_timer_mtimer.c index 1ad8508f..82239d5d 100644 --- a/lib/utils/timer/fdt_timer_mtimer.c +++ b/lib/utils/timer/fdt_timer_mtimer.c @@ -107,7 +107,7 @@ static int timer_mtimer_cold_init(void *fdt, int nodeoff, return 0; } -static unsigned long clint_offset = CLINT_MTIMER_OFFSET; +static const unsigned long clint_offset = CLINT_MTIMER_OFFSET; static const struct fdt_match timer_mtimer_match[] = { { .compatible = "riscv,clint0", .data = &clint_offset }, -- cgit v1.2.3