diff options
author | Elyes HAOUAS <ehaouas@noos.fr> | 2019-06-09 17:38:25 +0200 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2019-06-21 15:06:47 +0000 |
commit | 29e46d0aa6ec9ce0b5234bf3bdbd9f22c951252c (patch) | |
tree | 5c2e329fbd6ca08b5dfe66c65eb8fa00049ff7ab | |
parent | 504215b9f68e26938eea75afcbc22bdf389af991 (diff) | |
download | flashrom-29e46d0aa6ec9ce0b5234bf3bdbd9f22c951252c.tar.gz flashrom-29e46d0aa6ec9ce0b5234bf3bdbd9f22c951252c.tar.bz2 flashrom-29e46d0aa6ec9ce0b5234bf3bdbd9f22c951252c.zip |
ichspi.c: Remove unneeded 'else'
'else' is not needed after a 'break' or 'return'.
Change-Id: Ie000732158f27632ee92404c66a9aab43f3b374c
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33347
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
-rw-r--r-- | ichspi.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -1244,21 +1244,21 @@ static void ich_hwseq_set_addr(uint32_t addr) */ static uint32_t ich_hwseq_get_erase_block_size(unsigned int addr) { + uint8_t enc_berase; + static const uint32_t dec_berase[4] = { + 256, + 4 * 1024, + 8 * 1024, + 64 * 1024 + }; + if (hwseq_data.only_4k) { return 4 * 1024; - } else { - uint8_t enc_berase; - static const uint32_t dec_berase[4] = { - 256, - 4 * 1024, - 8 * 1024, - 64 * 1024 - }; - - ich_hwseq_set_addr(addr); - enc_berase = (REGREAD16(ICH9_REG_HSFS) & HSFS_BERASE) >> HSFS_BERASE_OFF; - return dec_berase[enc_berase]; } + + ich_hwseq_set_addr(addr); + enc_berase = (REGREAD16(ICH9_REG_HSFS) & HSFS_BERASE) >> HSFS_BERASE_OFF; + return dec_berase[enc_berase]; } /* Polls for Cycle Done Status, Flash Cycle Error or timeout in 8 us intervals. |