diff options
author | Jonathan Wright <jonathan.wright@arm.com> | 2018-03-14 15:56:21 +0000 |
---|---|---|
committer | Jonathan Wright <jonathan.wright@arm.com> | 2018-03-26 12:43:05 +0100 |
commit | 185a23ffa3b6fc007021ac9bbab2213c63911c0a (patch) | |
tree | 3d44244b8123c8be8ee14b355ef8cbc6f248c0ba /services/spd | |
parent | 649c48f5dca1765eabd42b5d630736a5d1e1f5e2 (diff) |
services: fix switch statements to comply with MISRA rules
Ensure (where possible) that switch statements in services comply with
MISRA rules 16.1 - 16.7.
Change-Id: I47bf6ed4a026201e6fe125ce51842482e99e8bb0
Signed-off-by: Jonathan Wright <jonathan.wright@arm.com>
Diffstat (limited to 'services/spd')
-rw-r--r-- | services/spd/opteed/opteed_main.c | 2 | ||||
-rw-r--r-- | services/spd/tlkd/tlkd_common.c | 1 | ||||
-rw-r--r-- | services/spd/tlkd/tlkd_main.c | 2 | ||||
-rw-r--r-- | services/spd/tspd/tspd_main.c | 3 |
4 files changed, 7 insertions, 1 deletions
diff --git a/services/spd/opteed/opteed_main.c b/services/spd/opteed/opteed_main.c index 13a307a2..3d679806 100644 --- a/services/spd/opteed/opteed_main.c +++ b/services/spd/opteed/opteed_main.c @@ -311,6 +311,7 @@ uint64_t opteed_smc_handler(uint32_t smc_fid, * OPTEE. Jump back to the original C runtime context. */ opteed_synchronous_sp_exit(optee_ctx, x1); + break; /* @@ -345,6 +346,7 @@ uint64_t opteed_smc_handler(uint32_t smc_fid, * return value to the caller */ opteed_synchronous_sp_exit(optee_ctx, x1); + break; /* * OPTEE is returning from a call or being preempted from a call, in diff --git a/services/spd/tlkd/tlkd_common.c b/services/spd/tlkd/tlkd_common.c index 483d45b6..d846269b 100644 --- a/services/spd/tlkd/tlkd_common.c +++ b/services/spd/tlkd/tlkd_common.c @@ -49,6 +49,7 @@ uint64_t tlkd_va_translate(uintptr_t va, int type) break; default: assert(0); + break; } /* get the (NS/S) physical address */ diff --git a/services/spd/tlkd/tlkd_main.c b/services/spd/tlkd/tlkd_main.c index cb68bff7..da3b732e 100644 --- a/services/spd/tlkd/tlkd_main.c +++ b/services/spd/tlkd/tlkd_main.c @@ -350,6 +350,7 @@ uint64_t tlkd_smc_handler(uint32_t smc_fid, * context. */ tlkd_synchronous_sp_exit(&tlk_ctx, x1); + break; /* * These function IDs are used only by TLK to indicate it has @@ -375,6 +376,7 @@ uint64_t tlkd_smc_handler(uint32_t smc_fid, * return value to the caller */ tlkd_synchronous_sp_exit(&tlk_ctx, x1); + break; /* * Return the number of service function IDs implemented to diff --git a/services/spd/tspd/tspd_main.c b/services/spd/tspd/tspd_main.c index 3d06e0b8..2312205c 100644 --- a/services/spd/tspd/tspd_main.c +++ b/services/spd/tspd/tspd_main.c @@ -435,6 +435,7 @@ uint64_t tspd_smc_handler(uint32_t smc_fid, * context. */ tspd_synchronous_sp_exit(tsp_ctx, x1); + break; #endif /* * This function ID is used only by the SP to indicate it has finished @@ -475,6 +476,7 @@ uint64_t tspd_smc_handler(uint32_t smc_fid, * return value to the caller */ tspd_synchronous_sp_exit(tsp_ctx, x1); + break; /* * Request from non-secure client to perform an @@ -591,7 +593,6 @@ uint64_t tspd_smc_handler(uint32_t smc_fid, SMC_RET3(ns_cpu_context, x1, x2, x3); } - break; /* * Request from the non-secure world to abort a preempted Yielding SMC * Call. |