Merge changes from topic "xlnx_fix_gen_uniq_var" into integration
* changes:
fix(psci): avoid altering function parameters
fix(services): avoid altering function parameters
fix(common): ignore the unused function return value
fix(psci): modify variable conflicting with external function
fix(delay-timer): create unique variable name
diff --git a/common/tf_log.c b/common/tf_log.c
index 2d976f6..bef1739 100644
--- a/common/tf_log.c
+++ b/common/tf_log.c
@@ -61,7 +61,7 @@
return;
}
- putchar('\n');
+ (void)putchar((int32_t)'\n');
}
/*
diff --git a/include/drivers/delay_timer.h b/include/drivers/delay_timer.h
index e9fdfb7..0ef6831 100644
--- a/include/drivers/delay_timer.h
+++ b/include/drivers/delay_timer.h
@@ -21,7 +21,7 @@
* the clock period in microseconds.
********************************************************************/
-typedef struct timer_ops {
+typedef struct timer_operation {
uint32_t (*get_timer_value)(void);
uint32_t clk_mult;
uint32_t clk_div;
diff --git a/lib/psci/psci_common.c b/lib/psci/psci_common.c
index 2d33350..17ecab8 100644
--- a/lib/psci/psci_common.c
+++ b/lib/psci/psci_common.c
@@ -1299,7 +1299,8 @@
/* Need to wait for other cores to shutdown */
if (wait_ms != 0U) {
- while ((wait_ms-- != 0U) && (!psci_is_last_on_cpu(this_cpu_idx))) {
+ for (uint32_t delay_ms = wait_ms; ((delay_ms != 0U) &&
+ (!psci_is_last_on_cpu(this_cpu_idx))); delay_ms--) {
mdelay(1U);
}
diff --git a/lib/psci/psci_off.c b/lib/psci/psci_off.c
index 577fdd7..932a039 100644
--- a/lib/psci/psci_off.c
+++ b/lib/psci/psci_off.c
@@ -94,7 +94,7 @@
if ((psci_spd_pm != NULL) && (psci_spd_pm->svc_off != NULL)) {
rc = psci_spd_pm->svc_off(0);
if (rc != PSCI_E_SUCCESS)
- goto exit;
+ goto off_exit;
}
/*
@@ -127,7 +127,7 @@
plat_psci_stat_accounting_start(&state_info);
#endif
-exit:
+off_exit:
/*
* Release the locks corresponding to each power level in the
* reverse order to which they were acquired.
diff --git a/lib/psci/psci_on.c b/lib/psci/psci_on.c
index 7e161dd..3eacb9c 100644
--- a/lib/psci/psci_on.c
+++ b/lib/psci/psci_on.c
@@ -93,7 +93,7 @@
psci_svc_cpu_data.aff_info_state);
rc = cpu_on_validate_state(psci_get_aff_info_state_by_idx(target_idx));
if (rc != PSCI_E_SUCCESS)
- goto exit;
+ goto on_exit;
/*
* Call the cpu on handler registered by the Secure Payload Dispatcher
@@ -151,7 +151,7 @@
psci_svc_cpu_data.aff_info_state);
}
-exit:
+on_exit:
psci_spin_unlock_cpu(target_idx);
return rc;
}
diff --git a/lib/psci/psci_suspend.c b/lib/psci/psci_suspend.c
index 0fb1ed3..f690e49 100644
--- a/lib/psci/psci_suspend.c
+++ b/lib/psci/psci_suspend.c
@@ -152,7 +152,7 @@
* detection that a wake-up interrupt has fired.
*/
if (read_isr_el1() != 0U) {
- goto exit;
+ goto suspend_exit;
}
#if PSCI_OS_INIT_MODE
@@ -163,7 +163,7 @@
*/
rc = psci_validate_state_coordination(idx, end_pwrlvl, state_info);
if (rc != PSCI_E_SUCCESS) {
- goto exit;
+ goto suspend_exit;
}
} else {
#endif
@@ -181,7 +181,7 @@
if (psci_plat_pm_ops->pwr_domain_validate_suspend != NULL) {
rc = psci_plat_pm_ops->pwr_domain_validate_suspend(state_info);
if (rc != PSCI_E_SUCCESS) {
- goto exit;
+ goto suspend_exit;
}
}
#endif
@@ -327,7 +327,7 @@
*/
psci_set_pwr_domains_to_run(idx, end_pwrlvl);
-exit:
+suspend_exit:
psci_release_pwr_domain_locks(end_pwrlvl, parent_nodes);
return rc;
diff --git a/services/std_svc/std_svc_setup.c b/services/std_svc/std_svc_setup.c
index 5cfe5f9..deca1c0 100644
--- a/services/std_svc/std_svc_setup.c
+++ b/services/std_svc/std_svc_setup.c
@@ -94,14 +94,19 @@
* calls to PSCI SMC handler
*/
static uintptr_t std_svc_smc_handler(uint32_t smc_fid,
- u_register_t x1,
- u_register_t x2,
- u_register_t x3,
- u_register_t x4,
+ u_register_t x1_arg,
+ u_register_t x2_arg,
+ u_register_t x3_arg,
+ u_register_t x4_arg,
void *cookie,
void *handle,
u_register_t flags)
{
+ u_register_t x1 = x1_arg;
+ u_register_t x2 = x2_arg;
+ u_register_t x3 = x3_arg;
+ u_register_t x4 = x4_arg;
+
if (((smc_fid >> FUNCID_CC_SHIFT) & FUNCID_CC_MASK) == SMC_32) {
/* 32-bit SMC function, clear top parameter bits */