fix(psci): add missing curly braces

This corrects the MISRA violation C2012-15.6:
The body of an iteration-statement or a selection-statement shall
be a compound-statement.
Enclosed statement body within the curly braces.

Change-Id: I8b656f59b445e914dd3f47e3dde83735481a3640
Signed-off-by: Nithin G <nithing@amd.com>
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
This commit is contained in:
Maheedhar Bollapalli 2024-04-25 11:47:27 +05:30
parent 88edd9c6a0
commit c7b0a28d32
5 changed files with 78 additions and 51 deletions

View file

@ -100,8 +100,9 @@ int psci_cpu_on_start(u_register_t target_cpu,
* to let it do any bookeeping. If the handler encounters an error, it's
* expected to assert within
*/
if ((psci_spd_pm != NULL) && (psci_spd_pm->svc_on != NULL))
if ((psci_spd_pm != NULL) && (psci_spd_pm->svc_on != NULL)) {
psci_spd_pm->svc_on(target_cpu);
}
/*
* Set the Affinity info state of the target cpu to ON_PENDING.
@ -140,10 +141,10 @@ int psci_cpu_on_start(u_register_t target_cpu,
rc = psci_plat_pm_ops->pwr_domain_on(target_cpu);
assert((rc == PSCI_E_SUCCESS) || (rc == PSCI_E_INTERN_FAIL));
if (rc == PSCI_E_SUCCESS)
if (rc == PSCI_E_SUCCESS) {
/* Store the re-entry information for the non-secure world. */
cm_init_context_by_index(target_idx, ep);
else {
} else {
/* Restore the state on error. */
psci_set_aff_info_state_by_idx(target_idx, AFF_STATE_OFF);
flush_cpu_data_by_index(target_idx,
@ -182,9 +183,9 @@ void psci_cpu_on_finish(unsigned int cpu_idx, const psci_power_state_t *state_in
* can only be done with the cpu and the cluster guaranteed to
* be coherent.
*/
if (psci_plat_pm_ops->pwr_domain_on_finish_late != NULL)
if (psci_plat_pm_ops->pwr_domain_on_finish_late != NULL) {
psci_plat_pm_ops->pwr_domain_on_finish_late(state_info);
}
/*
* All the platform specific actions for turning this cpu
* on have completed. Perform enough arch.initialization
@ -209,9 +210,9 @@ void psci_cpu_on_finish(unsigned int cpu_idx, const psci_power_state_t *state_in
* Dispatcher to let it do any bookeeping. If the handler encounters an
* error, it's expected to assert within
*/
if ((psci_spd_pm != NULL) && (psci_spd_pm->svc_on_finish != NULL))
if ((psci_spd_pm != NULL) && (psci_spd_pm->svc_on_finish != NULL)) {
psci_spd_pm->svc_on_finish(0);
}
PUBLISH_EVENT(psci_cpu_on_finish);
/* Populate the mpidr field within the cpu node array */