summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2018-12-19 11:57:15 +0000
committerNico Huber <nico.h@gmx.de>2019-02-03 18:44:16 +0000
commitdf4905822754ac1f303f7939f5b77b35e5ac4a67 (patch)
tree547a0248de382233cecfc018a25996ffc0195b2d
parent93e1625f9fb5f1080c40685488d006b2982062d7 (diff)
downloadflashrom-df4905822754ac1f303f7939f5b77b35e5ac4a67.tar.gz
flashrom-df4905822754ac1f303f7939f5b77b35e5ac4a67.tar.bz2
flashrom-df4905822754ac1f303f7939f5b77b35e5ac4a67.zip
Fix several -Wno-missing-field-initializers warnings
Change-Id: Ib4487d4c1a38fa8471fa1f9034604412e9d14cf7 Signed-off-by: Richard Hughes <richard@hughsie.com> Reviewed-on: https://review.coreboot.org/c/30405 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
-rw-r--r--ichspi.c2
-rw-r--r--spi25.c6
-rw-r--r--util/ich_descriptors_tool/ich_descriptors_tool.c2
3 files changed, 8 insertions, 2 deletions
diff --git a/ichspi.c b/ichspi.c
index 21442084f..507d443da 100644
--- a/ichspi.c
+++ b/ichspi.c
@@ -1704,7 +1704,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 = {{ 0 }};
+ struct ich_descriptors desc = { 0 };
enum ich_spi_mode {
ich_auto,
ich_hwseq,
diff --git a/spi25.c b/spi25.c
index f3a35a18f..8b6c46264 100644
--- a/spi25.c
+++ b/spi25.c
@@ -321,9 +321,11 @@ static int spi_simple_write_cmd(struct flashctx *const flash, const uint8_t op,
{
struct spi_command cmds[] = {
{
+ .readarr = 0,
.writecnt = 1,
.writearr = (const unsigned char[]){ JEDEC_WREN },
}, {
+ .readarr = 0,
.writecnt = 1,
.writearr = (const unsigned char[]){ op },
},
@@ -344,9 +346,11 @@ static int spi_write_extended_address_register(struct flashctx *const flash, con
const uint8_t op = flash->chip->wrea_override ? : JEDEC_WRITE_EXT_ADDR_REG;
struct spi_command cmds[] = {
{
+ .readarr = 0,
.writecnt = 1,
.writearr = (const unsigned char[]){ JEDEC_WREN },
}, {
+ .readarr = 0,
.writecnt = 2,
.writearr = (const unsigned char[]){ op, regdata },
},
@@ -419,9 +423,11 @@ static int spi_write_cmd(struct flashctx *const flash, const uint8_t op,
uint8_t cmd[1 + JEDEC_MAX_ADDR_LEN + 256];
struct spi_command cmds[] = {
{
+ .readarr = 0,
.writecnt = 1,
.writearr = (const unsigned char[]){ JEDEC_WREN },
}, {
+ .readarr = 0,
.writearr = cmd,
},
NULL_SPI_CMD,
diff --git a/util/ich_descriptors_tool/ich_descriptors_tool.c b/util/ich_descriptors_tool/ich_descriptors_tool.c
index aec97d0f0..aa857c883 100644
--- a/util/ich_descriptors_tool/ich_descriptors_tool.c
+++ b/util/ich_descriptors_tool/ich_descriptors_tool.c
@@ -150,7 +150,7 @@ int main(int argc, char *argv[])
const char *fn = NULL;
const char *csn = NULL;
enum ich_chipset cs = CHIPSET_ICH_UNKNOWN;
- struct ich_descriptors desc = {{ 0 }};
+ struct ich_descriptors desc = { 0 };
while ((opt = getopt(argc, argv, "df:c:")) != -1) {
switch (opt) {