From c426fd709fcf15f4643ac6729425c205d0ac1683 Mon Sep 17 00:00:00 2001 From: Sandrine Bailleux Date: Thu, 21 Jun 2018 11:41:43 +0200 Subject: [PATCH] Tegra: Fix up INFO() message With commit cf24229e6ef4 ("Run compiler on debug macros for type checking"), the compiler will now always evaluate INFO() macro calls, no matter the LOG_LEVEL value. Therefore, any variable referenced in the macro has to be be defined. Address this issue by removing the local variable and using the expression it was assigned directly in the INFO() call. Change-Id: Iedc23b3538c1e162372e85390881e50718e50bf3 Signed-off-by: Sandrine Bailleux --- plat/nvidia/tegra/common/tegra_bl31_setup.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plat/nvidia/tegra/common/tegra_bl31_setup.c b/plat/nvidia/tegra/common/tegra_bl31_setup.c index 2fe4e7dbc..f0a7036ef 100644 --- a/plat/nvidia/tegra/common/tegra_bl31_setup.c +++ b/plat/nvidia/tegra/common/tegra_bl31_setup.c @@ -116,9 +116,6 @@ void bl31_early_platform_setup(bl31_params_t *from_bl2, { plat_params_from_bl2_t *plat_params = (plat_params_from_bl2_t *)plat_params_from_bl2; -#if LOG_LEVEL >= LOG_LEVEL_INFO - int impl = (read_midr() >> MIDR_IMPL_SHIFT) & MIDR_IMPL_MASK; -#endif image_info_t bl32_img_info = { {0} }; uint64_t tzdram_start, tzdram_end, bl32_start, bl32_end; @@ -227,8 +224,9 @@ void bl31_early_platform_setup(bl31_params_t *from_bl2, /* Early platform setup for Tegra SoCs */ plat_early_platform_setup(); - INFO("BL3-1: Boot CPU: %s Processor [%lx]\n", (impl == DENVER_IMPL) ? - "Denver" : "ARM", read_mpidr()); + INFO("BL3-1: Boot CPU: %s Processor [%lx]\n", + (((read_midr() >> MIDR_IMPL_SHIFT) & MIDR_IMPL_MASK) + == DENVER_IMPL) ? "Denver" : "ARM", read_mpidr()); } #ifdef SPD_trusty -- GitLab