mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-27 23:35:10 +00:00
fix(zynqmp): 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: I8941f3c713586c36396e1f3731b99ffadc28c6e8 Signed-off-by: Nithin G <nithing@amd.com> Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
This commit is contained in:
parent
9ef62bd88d
commit
e4a0c44f69
3 changed files with 14 additions and 7 deletions
|
@ -110,8 +110,9 @@ uint64_t ipi_smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2,
|
||||||
|
|
||||||
disable_interrupt = ((x3 & IPI_SMC_ENQUIRY_DIRQ_MASK) != 0U);
|
disable_interrupt = ((x3 & IPI_SMC_ENQUIRY_DIRQ_MASK) != 0U);
|
||||||
ret = ipi_mb_enquire_status(ipi_local_id, ipi_remote_id);
|
ret = ipi_mb_enquire_status(ipi_local_id, ipi_remote_id);
|
||||||
if ((((uint32_t)ret & IPI_MB_STATUS_RECV_PENDING) > 0U) && disable_interrupt)
|
if ((((uint32_t)ret & IPI_MB_STATUS_RECV_PENDING) > 0U) && disable_interrupt) {
|
||||||
ipi_mb_disable_irq(ipi_local_id, ipi_remote_id);
|
ipi_mb_disable_irq(ipi_local_id, ipi_remote_id);
|
||||||
|
}
|
||||||
SMC_RET1(handle, ret);
|
SMC_RET1(handle, ret);
|
||||||
}
|
}
|
||||||
case IPI_MAILBOX_NOTIFY:
|
case IPI_MAILBOX_NOTIFY:
|
||||||
|
@ -128,8 +129,9 @@ uint64_t ipi_smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2,
|
||||||
|
|
||||||
enable_interrupt = ((x3 & IPI_SMC_ACK_EIRQ_MASK) != 0U);
|
enable_interrupt = ((x3 & IPI_SMC_ACK_EIRQ_MASK) != 0U);
|
||||||
ipi_mb_ack(ipi_local_id, ipi_remote_id);
|
ipi_mb_ack(ipi_local_id, ipi_remote_id);
|
||||||
if (enable_interrupt != 0)
|
if (enable_interrupt != 0) {
|
||||||
ipi_mb_enable_irq(ipi_local_id, ipi_remote_id);
|
ipi_mb_enable_irq(ipi_local_id, ipi_remote_id);
|
||||||
|
}
|
||||||
SMC_RET1(handle, 0);
|
SMC_RET1(handle, 0);
|
||||||
}
|
}
|
||||||
case IPI_MAILBOX_ENABLE_IRQ:
|
case IPI_MAILBOX_ENABLE_IRQ:
|
||||||
|
|
|
@ -101,9 +101,10 @@ static void zynqmp_pwr_domain_suspend(const psci_power_state_t *target_state)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i <= PLAT_MAX_PWR_LVL; i++)
|
for (size_t i = 0; i <= PLAT_MAX_PWR_LVL; i++) {
|
||||||
VERBOSE("%s: target_state->pwr_domain_state[%lu]=%x\n",
|
VERBOSE("%s: target_state->pwr_domain_state[%lu]=%x\n",
|
||||||
__func__, i, target_state->pwr_domain_state[i]);
|
__func__, i, target_state->pwr_domain_state[i]);
|
||||||
|
}
|
||||||
|
|
||||||
state = (target_state->pwr_domain_state[1] > PLAT_MAX_RET_STATE) ?
|
state = (target_state->pwr_domain_state[1] > PLAT_MAX_RET_STATE) ?
|
||||||
PM_STATE_SUSPEND_TO_RAM : PM_STATE_CPU_IDLE;
|
PM_STATE_SUSPEND_TO_RAM : PM_STATE_CPU_IDLE;
|
||||||
|
|
|
@ -2406,9 +2406,11 @@ static bool pm_clock_valid(uint32_t clock_id)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
for (i = 0U; i < ARRAY_SIZE(pm_clk_invalid_list); i++)
|
for (i = 0U; i < ARRAY_SIZE(pm_clk_invalid_list); i++) {
|
||||||
if (pm_clk_invalid_list[i] == clock_id)
|
if (pm_clk_invalid_list[i] == clock_id) {
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -3064,11 +3066,13 @@ uint8_t pm_clock_has_div(uint32_t clock_id, enum pm_clock_div_id div_id)
|
||||||
nodes = *clocks[clock_id].nodes;
|
nodes = *clocks[clock_id].nodes;
|
||||||
for (i = 0; i < clocks[clock_id].num_nodes; i++) {
|
for (i = 0; i < clocks[clock_id].num_nodes; i++) {
|
||||||
if (nodes[i].type == TYPE_DIV1) {
|
if (nodes[i].type == TYPE_DIV1) {
|
||||||
if (div_id == PM_CLOCK_DIV0_ID)
|
if (div_id == PM_CLOCK_DIV0_ID) {
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
} else if (nodes[i].type == TYPE_DIV2) {
|
} else if (nodes[i].type == TYPE_DIV2) {
|
||||||
if (div_id == PM_CLOCK_DIV1_ID)
|
if (div_id == PM_CLOCK_DIV1_ID) {
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/* To fix the misra 15.7 warning */
|
/* To fix the misra 15.7 warning */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue