fix(psci): add const qualifier
This corrects the MISRA violation C2012-8.13:
A pointer should point to a const-qualified type whenever possible.
Added const qualifier to pointer in the function arguments.
Change-Id: Id3d4aa528f275973a37c0b9af04495632cb2dda3
Signed-off-by: Nithin G <nithing@amd.com>
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
diff --git a/lib/psci/psci_common.c b/lib/psci/psci_common.c
index 234a195..2d33350 100644
--- a/lib/psci/psci_common.c
+++ b/lib/psci/psci_common.c
@@ -546,7 +546,7 @@
unsigned int lvl, parent_idx;
unsigned int start_idx;
unsigned int ncpus;
- plat_local_state_t target_state, *req_states;
+ plat_local_state_t target_state;
assert(end_pwrlvl <= PLAT_MAX_PWR_LVL);
parent_idx = psci_cpu_pd_nodes[cpu_idx].parent_node;
@@ -561,7 +561,8 @@
/* Get the requested power states for this power level */
start_idx = psci_non_cpu_pd_nodes[parent_idx].cpu_start_idx;
- req_states = psci_get_req_local_pwr_states(lvl, start_idx);
+ plat_local_state_t const *req_states = psci_get_req_local_pwr_states(lvl,
+ start_idx);
/*
* Let the platform coordinate amongst the requested states at