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>
diff --git a/services/spd/opteed/opteed_main.c b/services/spd/opteed/opteed_main.c
index 13a307a..3d67980 100644
--- a/services/spd/opteed/opteed_main.c
+++ b/services/spd/opteed/opteed_main.c
@@ -311,6 +311,7 @@
* OPTEE. Jump back to the original C runtime context.
*/
opteed_synchronous_sp_exit(optee_ctx, x1);
+ break;
/*
@@ -345,6 +346,7 @@
* 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 483d45b..d846269 100644
--- a/services/spd/tlkd/tlkd_common.c
+++ b/services/spd/tlkd/tlkd_common.c
@@ -49,6 +49,7 @@
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 cb68bff..da3b732 100644
--- a/services/spd/tlkd/tlkd_main.c
+++ b/services/spd/tlkd/tlkd_main.c
@@ -350,6 +350,7 @@
* 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 @@
* 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 3d06e0b..2312205 100644
--- a/services/spd/tspd/tspd_main.c
+++ b/services/spd/tspd/tspd_main.c
@@ -435,6 +435,7 @@
* 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 @@
* 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 @@
SMC_RET3(ns_cpu_context, x1, x2, x3);
}
- break;
/*
* Request from the non-secure world to abort a preempted Yielding SMC
* Call.