]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: EXYNOS: Annotate iomem and pm_data pointers __ro_after_init
authorKrzysztof Kozlowski <krzk@kernel.org>
Sat, 10 Dec 2016 13:47:33 +0000 (15:47 +0200)
committerKrzysztof Kozlowski <krzk@kernel.org>
Thu, 29 Dec 2016 13:28:55 +0000 (15:28 +0200)
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>
arch/arm/mach-exynos/exynos.c
arch/arm/mach-exynos/mcpm-exynos.c
arch/arm/mach-exynos/suspend.c

index 757fc11de30d824036baf9de37cacfb1a036b7eb..35b832f4bc7ecac3a233eab04a8416a54931fab9 100644 (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)
 {
index f086bf615b2972ee640e61256cba3438c9c9ae2a..038fd8c993d0e6aa58acd7698be6c29cd287d4cc 100644 (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
index be29f06d04f1ce7935ad11280069babed1bbfc5e..5184202410621d27f341c5c691c8d6f2c948038a 100644 (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;