summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2021-06-17 21:20:09 +0200
committerNico Huber <nico.h@gmx.de>2021-06-19 11:53:23 +0000
commit4bcf4add1167bcfc9ced8510d20535ce111d4b49 (patch)
treea3792bad452dcb3fe3862d464c646cb85431ae38
parent1d3013bbdc77d20ad669f227b710ee3fa66e87b9 (diff)
downloadflashrom-4bcf4add1167bcfc9ced8510d20535ce111d4b49.tar.gz
flashrom-4bcf4add1167bcfc9ced8510d20535ce111d4b49.tar.bz2
flashrom-4bcf4add1167bcfc9ced8510d20535ce111d4b49.zip
ich_descriptors: Drop some unnecessary `else` after `return`
Change-Id: Id739bc12832e3b441e8e7e1dcdcc4c05b260d7ad Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/flashrom/+/55645 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--ich_descriptors.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/ich_descriptors.c b/ich_descriptors.c
index fc04a2466..bf47ec09b 100644
--- a/ich_descriptors.c
+++ b/ich_descriptors.c
@@ -928,13 +928,13 @@ static enum ich_chipset guess_ich_chipset_from_content(const struct ich_desc_con
if (content->ICCRIBA == 0x00) {
if (content->MSL == 0 && content->ISL <= 2)
return CHIPSET_ICH8;
- else if (content->ISL <= 2)
+ if (content->ISL <= 2)
return CHIPSET_ICH9;
- else if (content->ISL <= 10)
+ if (content->ISL <= 10)
return CHIPSET_ICH10;
- else if (content->ISL <= 16)
+ if (content->ISL <= 16)
return CHIPSET_5_SERIES_IBEX_PEAK;
- else if (content->FLMAP2 == 0) {
+ if (content->FLMAP2 == 0) {
if (content->ISL == 23)
return CHIPSET_GEMINI_LAKE;
warn_peculiar_desc(content->ISL != 19, "Apollo Lake");
@@ -945,22 +945,20 @@ static enum ich_chipset guess_ich_chipset_from_content(const struct ich_desc_con
} else if (content->ICCRIBA < 0x31 && content->FMSBA < 0x30) {
if (content->MSL == 0 && content->ISL <= 17)
return CHIPSET_BAYTRAIL;
- else if (content->MSL <= 1 && content->ISL <= 18)
+ if (content->MSL <= 1 && content->ISL <= 18)
return CHIPSET_6_SERIES_COUGAR_POINT;
- else if (content->MSL <= 1 && content->ISL <= 21)
+ if (content->MSL <= 1 && content->ISL <= 21)
return CHIPSET_8_SERIES_LYNX_POINT;
warn_peculiar_desc(true, "Wildcat Point");
return CHIPSET_9_SERIES_WILDCAT_POINT;
} else if (content->ICCRIBA < 0x34) {
if (content->NM == 6)
return CHIPSET_C620_SERIES_LEWISBURG;
- else
- return CHIPSET_100_SERIES_SUNRISE_POINT;
+ return CHIPSET_100_SERIES_SUNRISE_POINT;
} else if (content->ICCRIBA == 0x34) {
if (content->NM == 6)
return CHIPSET_C620_SERIES_LEWISBURG;
- else
- return CHIPSET_300_SERIES_CANNON_POINT;
+ return CHIPSET_300_SERIES_CANNON_POINT;
} else {
msg_pwarn("Unknown flash descriptor, assuming 300 series compatibility.\n");
return CHIPSET_300_SERIES_CANNON_POINT;