aboutsummaryrefslogtreecommitdiff
path: root/lib/pmf/pmf_smc.c
diff options
context:
space:
mode:
authorJonathan Wright <jonathan.wright@arm.com>2018-03-13 17:45:42 +0000
committerJonathan Wright <jonathan.wright@arm.com>2018-03-26 12:43:05 +0100
commit3eacacc0ef6a8beefd858ff36cbc35e2b9ff5b07 (patch)
tree54a91f0ed59a18ecb09c6ff153931f2dac58f7b7 /lib/pmf/pmf_smc.c
parent5aa7498abdddcfd4ac8a04d7726798d452f13bb2 (diff)
downloadtrusted-firmware-a-3eacacc0ef6a8beefd858ff36cbc35e2b9ff5b07.tar.gz
lib: fix switch statements to comply with MISRA rules
Ensure (where possible) that switch statements in lib comply with MISRA rules 16.1 - 16.7. Change-Id: I52bc896fb7094d2b7569285686ee89f39f1ddd84 Signed-off-by: Jonathan Wright <jonathan.wright@arm.com>
Diffstat (limited to 'lib/pmf/pmf_smc.c')
-rw-r--r--lib/pmf/pmf_smc.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/pmf/pmf_smc.c b/lib/pmf/pmf_smc.c
index 5cf193e219..e86611802b 100644
--- a/lib/pmf/pmf_smc.c
+++ b/lib/pmf/pmf_smc.c
@@ -30,8 +30,7 @@ uintptr_t pmf_smc_handler(unsigned int smc_fid,
x2 = (uint32_t)x2;
x3 = (uint32_t)x3;
- switch (smc_fid) {
- case PMF_SMC_GET_TIMESTAMP_32:
+ if (smc_fid == PMF_SMC_GET_TIMESTAMP_32) {
/*
* Return error code and the captured
* time-stamp to the caller.
@@ -41,13 +40,9 @@ uintptr_t pmf_smc_handler(unsigned int smc_fid,
rc = pmf_get_timestamp_smc(x1, x2, x3, &ts_value);
SMC_RET3(handle, rc, (uint32_t)ts_value,
(uint32_t)(ts_value >> 32));
-
- default:
- break;
}
} else {
- switch (smc_fid) {
- case PMF_SMC_GET_TIMESTAMP_64:
+ if (smc_fid == PMF_SMC_GET_TIMESTAMP_64) {
/*
* Return error code and the captured
* time-stamp to the caller.
@@ -56,9 +51,6 @@ uintptr_t pmf_smc_handler(unsigned int smc_fid,
*/
rc = pmf_get_timestamp_smc(x1, x2, x3, &ts_value);
SMC_RET2(handle, rc, ts_value);
-
- default:
- break;
}
}