Skip to content

Commit

Permalink
clocksource/drivers/imx-sysctr: Mark two variable with __ro_after_init
Browse files Browse the repository at this point in the history
The variables 'sys_ctr_base' and 'cmpcr' are not be updated after
init, so mark them as __ro_after_init.

Cc: Kees Cook <[email protected]>
Signed-off-by: Peng Fan <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Lezcano <[email protected]>
  • Loading branch information
MrVan authored and dlezcano committed Dec 9, 2021
1 parent a2807f6 commit f5bd5fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/clocksource/timer-imx-sysctr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit f5bd5fc

Please sign in to comment.