mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 01:54:22 +00:00
fix(zynqmp): remove redundant api_version check
The api_version is checked in pm_setup() and an error is returned. The smc handlers will not be registered on error so doing the check again is redundant. This also silences a warning when compiling with -Wextra. Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Change-Id: I09395e6a20e3f6eb22a1f81ec2f6bdf034eeb4bf
This commit is contained in:
parent
f4b8470fee
commit
d0b58c8a9b
1 changed files with 11 additions and 15 deletions
|
@ -334,22 +334,18 @@ uint64_t pm_smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2, uint64_t x3,
|
|||
SMC_RET1(handle, (uint64_t)ret);
|
||||
|
||||
case PM_GET_API_VERSION:
|
||||
/* Check is PM API version already verified */
|
||||
if (pm_ctx.api_version >= PM_VERSION) {
|
||||
if (ipi_irq_flag == 0U) {
|
||||
/*
|
||||
* Enable IPI IRQ
|
||||
* assume the rich OS is OK to handle callback IRQs now.
|
||||
* Even if we were wrong, it would not enable the IRQ in
|
||||
* the GIC.
|
||||
*/
|
||||
pm_ipi_irq_enable(primary_proc);
|
||||
ipi_irq_flag = 1U;
|
||||
}
|
||||
SMC_RET1(handle, (uint64_t)PM_RET_SUCCESS |
|
||||
((uint64_t)pm_ctx.api_version << 32));
|
||||
if (ipi_irq_flag == 0U) {
|
||||
/*
|
||||
* Enable IPI IRQ
|
||||
* assume the rich OS is OK to handle callback IRQs now.
|
||||
* Even if we were wrong, it would not enable the IRQ in
|
||||
* the GIC.
|
||||
*/
|
||||
pm_ipi_irq_enable(primary_proc);
|
||||
ipi_irq_flag = 1U;
|
||||
}
|
||||
|
||||
SMC_RET1(handle, (uint64_t)PM_RET_SUCCESS |
|
||||
((uint64_t)pm_ctx.api_version << 32));
|
||||
case PM_FPGA_LOAD:
|
||||
ret = pm_fpga_load(pm_arg[0], pm_arg[1], pm_arg[2], pm_arg[3]);
|
||||
SMC_RET1(handle, (uint64_t)ret);
|
||||
|
|
Loading…
Add table
Reference in a new issue