From: Krzysztof Kozlowski <krzk@kernel.org> Date: 2016-12-10 13:48:01
The list of retention registers (release_ret_regs field of struct
exynos_pm_data and arrays with values) are not modified and can be made
const to improve the const safeness.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
arch/arm/mach-exynos/suspend.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
From: Krzysztof Kozlowski <krzk@kernel.org> Date: 2016-12-10 13:48:07
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>
---
arch/arm/mach-exynos/exynos.c | 4 ++--
arch/arm/mach-exynos/mcpm-exynos.c | 2 +-
arch/arm/mach-exynos/suspend.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
From: Krzysztof Kozlowski <krzk@kernel.org> Date: 2016-12-10 13:48:14
The xtal_f and xusbxti_f static variables are modified only through
__init accessors (like s3c64xx_set_xtal_freq()). Later these variables
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>
---
Looks safe, but not tested.
---
arch/arm/mach-s3c64xx/common.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
From: Krzysztof Kozlowski <krzk@kernel.org> Date: 2016-12-10 13:48:20
The samsung_sync_wakemask() iterates over passed array of wake irqs but
does not modify it.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
arch/arm/plat-samsung/include/plat/wakeup-mask.h | 2 +-
arch/arm/plat-samsung/wakeup-mask.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
From: Krzysztof Kozlowski <krzk@kernel.org> Date: 2016-12-10 13:48:23
samsung_sync_wakemask() accepts pointer to const data so wake_irqs can
be made const to increase safeness.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
arch/arm/mach-s3c24xx/pm-s3c2412.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -53,7 +53,7 @@ static int s3c2412_cpu_suspend(unsigned long arg)}/* mapping of interrupts to parts of the wakeup mask */-staticstructsamsung_wakeup_maskwake_irqs[]={+staticconststructsamsung_wakeup_maskwake_irqs[]={{.irq=IRQ_RTC,.bit=S3C2412_PWRCFG_RTC_MASKIRQ,},};
From: Krzysztof Kozlowski <krzk@kernel.org> Date: 2016-12-10 13:48:27
samsung_sync_wakemask() accepts pointer to const data so wake_irqs can
be made const to increase safeness.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
arch/arm/mach-s3c64xx/pm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -285,7 +285,7 @@ static int s3c64xx_cpu_suspend(unsigned long arg)}/* mapping of interrupts to parts of the wakeup mask */-staticstructsamsung_wakeup_maskwake_irqs[]={+staticconststructsamsung_wakeup_maskwake_irqs[]={{.irq=IRQ_RTC_ALARM,.bit=S3C64XX_PWRCFG_RTC_ALARM_DISABLE,},{.irq=IRQ_RTC_TIC,.bit=S3C64XX_PWRCFG_RTC_TICK_DISABLE,},{.irq=IRQ_PENDN,.bit=S3C64XX_PWRCFG_TS_DISABLE,},
From: Krzysztof Kozlowski <krzk@kernel.org> Date: 2016-12-10 13:49:11
These arrays are not modified so they can be made const.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
arch/arm/mach-s3c24xx/bast-irq.c | 4 ++--
arch/arm/mach-s3c24xx/iotiming-s3c2410.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
@@ -44,7 +44,7 @@/* table of ISA irq nos to the relevant mask... zero means*theirqisnotimplemented*/-staticunsignedcharbast_pc104_irqmasks[]={+staticconstunsignedcharbast_pc104_irqmasks[]={0,/* 0 */0,/* 1 */0,/* 2 */
Hi,
On Saturday, December 10, 2016 03:47:32 PM Krzysztof Kozlowski wrote:
The list of retention registers (release_ret_regs field of struct
exynos_pm_data and arrays with values) are not modified and can be made
const to improve the const safeness.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
for patches #1-7
Reviewed-by: Bartlomiej Zolnierkiewicz <redacted>
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics