From: Peng Fan Date: Wed, 1 Dec 2021 12:50:29 +0000 (+0800) Subject: clocksource/drivers/imx-sysctr: Mark two variable with __ro_after_init X-Git-Tag: v6.6.17~8412^2~1^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f5bd5fc9d478cdb94f89ccc74870dd81d1919b42;p=platform%2Fkernel%2Flinux-rpi.git clocksource/drivers/imx-sysctr: Mark two variable with __ro_after_init The variables 'sys_ctr_base' and 'cmpcr' are not be updated after init, so mark them as __ro_after_init. Cc: Kees Cook Signed-off-by: Peng Fan Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20211201125030.2307746-1-peng.fan@oss.nxp.com Signed-off-by: Daniel Lezcano --- diff --git a/drivers/clocksource/timer-imx-sysctr.c b/drivers/clocksource/timer-imx-sysctr.c index 18b90fc..2b309af 100644 --- a/drivers/clocksource/timer-imx-sysctr.c +++ b/drivers/clocksource/timer-imx-sysctr.c @@ -20,8 +20,8 @@ #define SYS_CTR_CLK_DIV 0x3 -static void __iomem *sys_ctr_base; -static u32 cmpcr; +static void __iomem *sys_ctr_base __ro_after_init; +static u32 cmpcr __ro_after_init; static void sysctr_timer_enable(bool enable) {