drivers: firmware: psci: drop duplicate const from psci_of_match
PATCH 1/2 drivers: firmware: psci: drop duplicate const from psci_of_match
From: Jisheng Zhang <[email protected]>
This is to fix below sparse warning:
drivers/firmware/psci.c:mmm:nn: warning: duplicate const
--- drivers/firmware/psci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/psci.c +1 -1
@@ -563,7 +563,7 @@ out_put_node:return err; } -static const struct of_device_id const psci_of_match[]__initconst = { +static const struct of_device_id psci_of_match[]__initconst = { { .compatible ="arm,psci" , .data = psci_0_1_init}, { .compatible ="arm,psci-0.2" , .data = psci_0_2_init}, { .compatible ="arm,psci-1.0" , .data = psci_0_2_init},
Signature · 1 line
2.6.4
PATCH 2/2 drivers: firmware: psci: make two helper functions static
From: Jisheng Zhang <[email protected]>
psci_power_state_loses_context() and psci_power_state_is_valid are only used internally now, so make them static.
--- drivers/firmware/psci.c | 4 ++-- include/linux/psci.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/firmware/psci.c +2 -2
@@ -91,7 +91,7 @@ static inline bool psci_has_ext_power_state(void)PSCI_1_0_FEATURES_CPU_SUSPEND_PF_MASK ; } -bool psci_power_state_loses_context (u32 state) +static bool psci_power_state_loses_context (u32 state) {const u32 mask =psci_has_ext_power_state () ? PSCI_1_0_EXT_POWER_STATE_TYPE_MASK :
@@ -100,7 +100,7 @@ bool psci_power_state_loses_context(u32 state)return state & mask; } -bool psci_power_state_is_valid (u32 state) +static bool psci_power_state_is_valid (u32 state) {const u32 valid_mask =psci_has_ext_power_state () ? PSCI_1_0_EXT_POWER_STATE_MASK :
include/linux/psci.h +0 -2
@@ -21,8 +21,6 @@#define PSCI_POWER_STATE_TYPE_POWER_DOWN 1bool psci_tos_resident_on (int cpu); -bool psci_power_state_loses_context (u32 state); -bool psci_power_state_is_valid (u32 state);int psci_cpu_init_idle (unsigned int cpu);int psci_cpu_suspend_enter (unsigned long index);
Signature · 1 line
2.6.4
Arnd Bergmann
AppliedPATCH 2/2 drivers: firmware: psci: make two helper functions static
Quoted 8 lines · On Wednesday 20 April 2016 11:20:28 Lorenzo Pieralisi wrote:
From: Jisheng Zhang <[email protected]>
psci_power_state_loses_context()andpsci_power_state_is_validare only used internally now, so make them static.Signed-off-by Jisheng Zhang <[email protected]>Signed-off-by Lorenzo Pieralisi <[email protected]>
Applied both patches to next/drivers, thanks!
Arnd
Mark Rutland
maintainerPATCH 1/2 drivers: firmware: psci: drop duplicate const from psci_of_match
In reply to Lorenzo PieralisiQuoted 7 lines · Lorenzo Pieralisi
From: Jisheng Zhang <[email protected]>
This is to fix below sparse warning:
drivers/firmware/psci.c:mmm:nn: warning: duplicate constSigned-off-by Jisheng Zhang <[email protected]>Signed-off-by Lorenzo Pieralisi <[email protected]>
FWIW, for both:
Thanks for picking them up!
Mark.
Quoted 20 lines
--- drivers/firmware/psci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/firmware/psci.c +1
-1@@ -563,7 +563,7 @@ out_put_node:return err; } -static const struct of_device_id const psci_of_match[]__initconst = { +static const struct of_device_id psci_of_match[]__initconst = { { .compatible ="arm,psci" , .data = psci_0_1_init}, { .compatible ="arm,psci-0.2" , .data = psci_0_2_init}, { .compatible ="arm,psci-1.0" , .data = psci_0_2_init},Signature · 1 line
2.6.4