From e138400d1c19a561eaf9f23b0cadc07226684561 Mon Sep 17 00:00:00 2001 From: Boyan Karatotev Date: Fri, 18 Nov 2022 14:17:17 +0000 Subject: fix: unify fallthrough annotations Compiling with -Wimplicit-fallthrough=3 (enabled by -Wextra) produces many warnings about fallthrough comments either missing or being wrong. Unify the comments so we comply with -Wextra. Note that Coverity recommends against using the __attribute__ directive. Also, zlib does not build with a higher value of -Wimplicit-fallthrough. Finally, compilers strip comments before expanding macros. As such, checkpatch's fallthrough annotation (or higher levels of the flag) isn't really possible. Signed-off-by: Boyan Karatotev Change-Id: I060cf4f8dc04c02cbb45cf4ceb69569a8369ccee --- services/std_svc/spmd/spmd_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'services') diff --git a/services/std_svc/spmd/spmd_main.c b/services/std_svc/spmd/spmd_main.c index 7e6c89df3..afd0f2ea2 100644 --- a/services/std_svc/spmd/spmd_main.c +++ b/services/std_svc/spmd/spmd_main.c @@ -868,7 +868,8 @@ uint64_t spmd_smc_handler(uint32_t smc_fid, FFA_ERROR_NOT_SUPPORTED); } - /* Fall through to forward the call to the other world */ + /* Forward the call to the other world */ + /* fallthrough */ case FFA_MSG_SEND: case FFA_MSG_SEND_DIRECT_RESP_SMC64: case FFA_MEM_DONATE_SMC32: @@ -908,7 +909,8 @@ uint64_t spmd_smc_handler(uint32_t smc_fid, spmd_spm_core_sync_exit(0ULL); } - /* Fall through to forward the call to the other world */ + /* Forward the call to the other world */ + /* fallthrough */ case FFA_INTERRUPT: case FFA_MSG_YIELD: /* This interface must be invoked only by the Secure world */ -- cgit v1.2.1