[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202112021604.E65EDA8D6@keescook>
Date: Thu, 2 Dec 2021 16:05:19 -0800
From: Kees Cook <keescook@...omium.org>
To: "Peng Fan (OSS)" <peng.fan@....nxp.com>
Cc: daniel.lezcano@...aro.org, tglx@...utronix.de, shawnguo@...nel.org,
s.hauer@...gutronix.de, kernel@...gutronix.de, festevam@...il.com,
linux-imx@....com, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, van.freenix@...il.com,
Peng Fan <peng.fan@....com>
Subject: Re: [PATCH 1/2] clocksource/drivers/imx-sysctr: mark two variable
with __ro_after_init
On Wed, Dec 01, 2021 at 08:50:29PM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@....com>
>
> sys_ctr_base and cmpcr will not be updated after init, so mark
> as __ro_after_init.
>
> Cc: Kees Cook <keescook@...omium.org>
> Signed-off-by: Peng Fan <peng.fan@....com>
Always nice to get more of these. :)
Reviewed-by: Kees Cook <keescook@...omium.org>
Thanks!
-Kees
> ---
> drivers/clocksource/timer-imx-sysctr.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/clocksource/timer-imx-sysctr.c b/drivers/clocksource/timer-imx-sysctr.c
> index 18b90fc56bfc..2b309af11266 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)
> {
> --
> 2.25.1
>
--
Kees Cook
Powered by blists - more mailing lists