From: Yann Gautier Date: Tue, 19 Oct 2021 11:31:06 +0000 (+0200) Subject: fix(stm32mp1): rework switch/case for MISRA X-Git-Tag: baikal/aarch64/sdk5.9~499^2~1 X-Git-Url: https://git.baikalelectronics.ru/?a=commitdiff_plain;h=f7130e81cf9c3682232bb9319b1798184b44920f;p=arm-tf.git fix(stm32mp1): rework switch/case for MISRA Avoid the use of return inside switch/case in stm32mp_is_single_core(). Although this MISRA rulre might not be enforced, we align on what is done for stm32mp_is_auth_supported(). Change-Id: I00a5ec1b18c55b4254af00c9c5cf5a4dce104175 Signed-off-by: Yann Gautier --- diff --git a/plat/st/stm32mp1/stm32mp1_private.c b/plat/st/stm32mp1/stm32mp1_private.c index 51569758a..9b39b9d3e 100644 --- a/plat/st/stm32mp1/stm32mp1_private.c +++ b/plat/st/stm32mp1/stm32mp1_private.c @@ -420,15 +420,20 @@ void stm32mp_print_boardinfo(void) /* Return true when SoC provides a single Cortex-A7 core, and false otherwise */ bool stm32mp_is_single_core(void) { + bool single_core = false; + switch (get_part_number()) { case STM32MP151A_PART_NB: case STM32MP151C_PART_NB: case STM32MP151D_PART_NB: case STM32MP151F_PART_NB: - return true; + single_core = true; + break; default: - return false; + break; } + + return single_core; } /* Return true when device is in closed state */