diff options
author | Dimitris Papastamos <dimitris.papastamos@arm.com> | 2018-03-29 13:20:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-29 13:20:05 +0100 |
commit | 6ab136c258ed4616d8cf1ebf1c5a4a74b75d35bc (patch) | |
tree | 59d6d3499fff950a6a5e18593f2166cd9d0c6565 /plat/common/plat_gicv2.c | |
parent | 875a85aae6b0c9ae411ed899f827c4bbc0703438 (diff) | |
parent | 185a23ffa3b6fc007021ac9bbab2213c63911c0a (diff) | |
download | platform_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.c | 12 |
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); |