From 858dc35cfde12ddf6250ed393298fa85d01b77d5 Mon Sep 17 00:00:00 2001 From: Maheedhar Bollapalli Date: Thu, 25 Apr 2024 12:12:40 +0530 Subject: [PATCH] fix(el3-runtime): 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: I14a69f79aba98e243fa29a50914431358efa2a49 Signed-off-by: Nithin G Signed-off-by: Maheedhar Bollapalli --- lib/el3_runtime/aarch64/context_mgmt.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/el3_runtime/aarch64/context_mgmt.c b/lib/el3_runtime/aarch64/context_mgmt.c index e28e1c34e..3388f1c52 100644 --- a/lib/el3_runtime/aarch64/context_mgmt.c +++ b/lib/el3_runtime/aarch64/context_mgmt.c @@ -1966,10 +1966,11 @@ void cm_el1_sysregs_context_save(uint32_t security_state) el1_sysregs_context_save(get_el1_sysregs_ctx(ctx)); #if IMAGE_BL31 - if (security_state == SECURE) + if (security_state == SECURE) { PUBLISH_EVENT(cm_exited_secure_world); - else + } else { PUBLISH_EVENT(cm_exited_normal_world); + } #endif } @@ -1983,10 +1984,11 @@ void cm_el1_sysregs_context_restore(uint32_t security_state) el1_sysregs_context_restore(get_el1_sysregs_ctx(ctx)); #if IMAGE_BL31 - if (security_state == SECURE) + if (security_state == SECURE) { PUBLISH_EVENT(cm_entering_secure_world); - else + } else { PUBLISH_EVENT(cm_entering_normal_world); + } #endif }