diff options
author | Jonathan Wright <jonathan.wright@arm.com> | 2018-03-14 15:24:00 +0000 |
---|---|---|
committer | Jonathan Wright <jonathan.wright@arm.com> | 2018-03-26 12:43:05 +0100 |
commit | 649c48f5dca1765eabd42b5d630736a5d1e1f5e2 (patch) | |
tree | 48e9700b7154e62d0e8b43e732346e3929b938a3 /plat/mediatek | |
parent | 3eacacc0ef6a8beefd858ff36cbc35e2b9ff5b07 (diff) |
plat: fix switch statements to comply with MISRA rules
Ensure (where possible) that switch statements in plat comply with MISRA
rules 16.1 - 16.7.
Change-Id: Ie4a7d2fd10f6141c0cfb89317ea28a755391622f
Signed-off-by: Jonathan Wright <jonathan.wright@arm.com>
Diffstat (limited to 'plat/mediatek')
-rw-r--r-- | plat/mediatek/common/custom/oem_svc.c | 11 | ||||
-rw-r--r-- | plat/mediatek/common/mtk_sip_svc.c | 3 |
2 files changed, 5 insertions, 9 deletions
diff --git a/plat/mediatek/common/custom/oem_svc.c b/plat/mediatek/common/custom/oem_svc.c index 08baed87..49e7571d 100644 --- a/plat/mediatek/common/custom/oem_svc.c +++ b/plat/mediatek/common/custom/oem_svc.c @@ -41,15 +41,8 @@ uint64_t oem_smc_handler(uint32_t smc_fid, void *handle, uint64_t flags) { - uint64_t rc; - - switch (smc_fid) { - default: - rc = SMC_UNK; - WARN("Unimplemented OEM Call: 0x%x\n", smc_fid); - } - - SMC_RET1(handle, rc); + WARN("Unimplemented OEM Call: 0x%x\n", smc_fid); + SMC_RET1(handle, SMC_UNK); } /* diff --git a/plat/mediatek/common/mtk_sip_svc.c b/plat/mediatek/common/mtk_sip_svc.c index beb2a697..869a9590 100644 --- a/plat/mediatek/common/mtk_sip_svc.c +++ b/plat/mediatek/common/mtk_sip_svc.c @@ -71,6 +71,9 @@ uint64_t mediatek_sip_handler(uint32_t smc_fid, boot_to_kernel(x1, x2, x3, x4); SMC_RET0(handle); #endif + default: + /* Do nothing in default case */ + break; } } |