1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-27 23:22:37 +02:00

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>
This commit is contained in:
Elyes HAOUAS 2019-06-09 17:38:25 +02:00 committed by Nico Huber
parent 504215b9f6
commit 29e46d0aa6

View File

@ -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.