aboutsummaryrefslogtreecommitdiffstats
path: root/plat/common/plat_gicv2.c
diff options
context:
space:
mode:
authorDimitris Papastamos <dimitris.papastamos@arm.com>2018-03-29 13:20:05 +0100
committerGitHub <noreply@github.com>2018-03-29 13:20:05 +0100
commit6ab136c258ed4616d8cf1ebf1c5a4a74b75d35bc (patch)
tree59d6d3499fff950a6a5e18593f2166cd9d0c6565 /plat/common/plat_gicv2.c
parent875a85aae6b0c9ae411ed899f827c4bbc0703438 (diff)
parent185a23ffa3b6fc007021ac9bbab2213c63911c0a (diff)
downloadplatform_external_arm-trusted-firmware-6ab136c258ed4616d8cf1ebf1c5a4a74b75d35bc.tar.gz
platform_external_arm-trusted-firmware-6ab136c258ed4616d8cf1ebf1c5a4a74b75d35bc.tar.bz2
platform_external_arm-trusted-firmware-6ab136c258ed4616d8cf1ebf1c5a4a74b75d35bc.zip
Merge pull request #1313 from jonathanwright-ARM/jw/MISRA-switch-statements
Fix switch statements to comply with MISRA rules
Diffstat (limited to 'plat/common/plat_gicv2.c')
-rw-r--r--plat/common/plat_gicv2.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/plat/common/plat_gicv2.c b/plat/common/plat_gicv2.c
index ca6c03b01..026ea7132 100644
--- a/plat/common/plat_gicv2.c
+++ b/plat/common/plat_gicv2.c
@@ -190,6 +190,8 @@ void plat_ic_set_interrupt_priority(unsigned int id, unsigned int priority)
int plat_ic_has_interrupt_type(unsigned int type)
{
+ int has_interrupt_type = 0;
+
switch (type) {
#if GICV2_G0_FOR_EL3
case INTR_TYPE_EL3:
@@ -197,10 +199,14 @@ int plat_ic_has_interrupt_type(unsigned int type)
case INTR_TYPE_S_EL1:
#endif
case INTR_TYPE_NS:
- return 1;
+ has_interrupt_type = 1;
+ break;
default:
- return 0;
+ /* Do nothing in default case */
+ break;
}
+
+ return has_interrupt_type;
}
void plat_ic_set_interrupt_type(unsigned int id, unsigned int type)
@@ -221,6 +227,7 @@ void plat_ic_set_interrupt_type(unsigned int id, unsigned int type)
break;
default:
assert(0);
+ break;
}
gicv2_set_interrupt_type(id, gicv2_type);
@@ -260,6 +267,7 @@ void plat_ic_set_spi_routing(unsigned int id, unsigned int routing_mode,
break;
default:
assert(0);
+ break;
}
gicv2_set_spi_routing(id, proc_num);