mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-18 02:24:18 +00:00
fix(tc): fix compilation error
When the SPD_spmd configuration is disabled, the compiler complaints: plat/arm/board/tc/tc_bl2_dpe.c:234:22: error: unused variable 'array_size' [-Werror=unused-variable] 234 | const size_t array_size = ARRAY_SIZE(tc_dpe_metadata); | ^~~~~~~~~~ plat/arm/board/tc/tc_bl2_dpe.c:233:16: error: unused variable 'i' [-Werror=unused-variable] 233 | size_t i; | ^ cc1: all warnings being treated as errors Move variable declarations into the code chunk protected by the SPD_spmd configuration. Change-Id: I1a3889938e2d4ec5efec516e9ef54034f9d711b2 Signed-off-by: Leo Yan <leo.yan@arm.com>
This commit is contained in:
parent
604b879778
commit
26a520b2be
1 changed files with 5 additions and 5 deletions
|
@ -230,14 +230,10 @@ void plat_dpe_get_context_handle(int *ctx_handle)
|
||||||
|
|
||||||
void bl2_plat_mboot_init(void)
|
void bl2_plat_mboot_init(void)
|
||||||
{
|
{
|
||||||
|
#if defined(SPD_spmd)
|
||||||
size_t i;
|
size_t i;
|
||||||
const size_t array_size = ARRAY_SIZE(tc_dpe_metadata);
|
const size_t array_size = ARRAY_SIZE(tc_dpe_metadata);
|
||||||
|
|
||||||
/* Initialize the communication channel between AP and RSE */
|
|
||||||
(void)rse_comms_init(PLAT_RSE_AP_SND_MHU_BASE,
|
|
||||||
PLAT_RSE_AP_RCV_MHU_BASE);
|
|
||||||
|
|
||||||
#if defined(SPD_spmd)
|
|
||||||
for (i = 0U; i < array_size; i++) {
|
for (i = 0U; i < array_size; i++) {
|
||||||
if (tc_dpe_metadata[i].id != SP_PKG1_ID) {
|
if (tc_dpe_metadata[i].id != SP_PKG1_ID) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -257,6 +253,10 @@ void bl2_plat_mboot_init(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Initialize the communication channel between AP and RSE */
|
||||||
|
(void)rse_comms_init(PLAT_RSE_AP_SND_MHU_BASE,
|
||||||
|
PLAT_RSE_AP_RCV_MHU_BASE);
|
||||||
|
|
||||||
dpe_init(tc_dpe_metadata);
|
dpe_init(tc_dpe_metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue