ARM: EXYNOS: Annotate iomem and pm_data pointers __ro_after_init

The pointers to __iomem sysram and exynos_pm_data are set only during
initcalls.  Later the pointers itself are used only in read-only way so
we can mark them __ro_after_init to increase code safeness.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
This commit is contained in:
Krzysztof Kozlowski 2016-12-10 15:47:33 +02:00
parent b4765037fc
commit 731d97c236
3 changed files with 4 additions and 4 deletions

View File

@ -45,8 +45,8 @@ static struct platform_device exynos_cpuidle = {
.id = -1,
};
void __iomem *sysram_base_addr;
void __iomem *sysram_ns_base_addr;
void __iomem *sysram_base_addr __ro_after_init;
void __iomem *sysram_ns_base_addr __ro_after_init;
void __init exynos_sysram_init(void)
{

View File

@ -32,7 +32,7 @@
#define EXYNOS5420_USE_ARM_CORE_DOWN_STATE BIT(29)
#define EXYNOS5420_USE_L2_COMMON_UP_STATE BIT(30)
static void __iomem *ns_sram_base_addr;
static void __iomem *ns_sram_base_addr __ro_after_init;
/*
* The common v7_exit_coherency_flush API could not be used because of the

View File

@ -66,7 +66,7 @@ struct exynos_pm_data {
int (*cpu_suspend)(unsigned long);
};
static const struct exynos_pm_data *pm_data;
static const struct exynos_pm_data *pm_data __ro_after_init;
static int exynos5420_cpu_state;
static unsigned int exynos_pmu_spare3;