1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 22:21:16 +02:00

treewide: Drop unnecessary uses of memset/memcpy

Simply provide an initialiser or use a direct assignment instead.

Change-Id: I07385375cd8eec8a95874001b402b2c17ec09e09
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/55267
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
Angel Pons
2021-06-07 13:29:13 +02:00
committed by Nico Huber
parent 3bd47524c0
commit f41d24823c
8 changed files with 21 additions and 49 deletions

View File

@ -1720,7 +1720,7 @@ int ich_init_spi(void *spibar, enum ich_chipset ich_gen)
char *arg;
int ich_spi_rw_restricted = 0;
int desc_valid = 0;
struct ich_descriptors desc;
struct ich_descriptors desc = { 0 };
enum ich_spi_mode {
ich_auto,
ich_hwseq,
@ -1731,8 +1731,6 @@ int ich_init_spi(void *spibar, enum ich_chipset ich_gen)
ich_generation = ich_gen;
ich_spibar = spibar;
memset(&desc, 0x00, sizeof(desc));
/* Moving registers / bits */
switch (ich_gen) {
case CHIPSET_100_SERIES_SUNRISE_POINT: