mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 23:22:37 +02:00
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>
This commit is contained in:
parent
93e1625f9f
commit
df49058227
2
ichspi.c
2
ichspi.c
@ -1704,7 +1704,7 @@ int ich_init_spi(void *spibar, enum ich_chipset ich_gen)
|
|||||||
char *arg;
|
char *arg;
|
||||||
int ich_spi_rw_restricted = 0;
|
int ich_spi_rw_restricted = 0;
|
||||||
int desc_valid = 0;
|
int desc_valid = 0;
|
||||||
struct ich_descriptors desc = {{ 0 }};
|
struct ich_descriptors desc = { 0 };
|
||||||
enum ich_spi_mode {
|
enum ich_spi_mode {
|
||||||
ich_auto,
|
ich_auto,
|
||||||
ich_hwseq,
|
ich_hwseq,
|
||||||
|
6
spi25.c
6
spi25.c
@ -321,9 +321,11 @@ static int spi_simple_write_cmd(struct flashctx *const flash, const uint8_t op,
|
|||||||
{
|
{
|
||||||
struct spi_command cmds[] = {
|
struct spi_command cmds[] = {
|
||||||
{
|
{
|
||||||
|
.readarr = 0,
|
||||||
.writecnt = 1,
|
.writecnt = 1,
|
||||||
.writearr = (const unsigned char[]){ JEDEC_WREN },
|
.writearr = (const unsigned char[]){ JEDEC_WREN },
|
||||||
}, {
|
}, {
|
||||||
|
.readarr = 0,
|
||||||
.writecnt = 1,
|
.writecnt = 1,
|
||||||
.writearr = (const unsigned char[]){ op },
|
.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;
|
const uint8_t op = flash->chip->wrea_override ? : JEDEC_WRITE_EXT_ADDR_REG;
|
||||||
struct spi_command cmds[] = {
|
struct spi_command cmds[] = {
|
||||||
{
|
{
|
||||||
|
.readarr = 0,
|
||||||
.writecnt = 1,
|
.writecnt = 1,
|
||||||
.writearr = (const unsigned char[]){ JEDEC_WREN },
|
.writearr = (const unsigned char[]){ JEDEC_WREN },
|
||||||
}, {
|
}, {
|
||||||
|
.readarr = 0,
|
||||||
.writecnt = 2,
|
.writecnt = 2,
|
||||||
.writearr = (const unsigned char[]){ op, regdata },
|
.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];
|
uint8_t cmd[1 + JEDEC_MAX_ADDR_LEN + 256];
|
||||||
struct spi_command cmds[] = {
|
struct spi_command cmds[] = {
|
||||||
{
|
{
|
||||||
|
.readarr = 0,
|
||||||
.writecnt = 1,
|
.writecnt = 1,
|
||||||
.writearr = (const unsigned char[]){ JEDEC_WREN },
|
.writearr = (const unsigned char[]){ JEDEC_WREN },
|
||||||
}, {
|
}, {
|
||||||
|
.readarr = 0,
|
||||||
.writearr = cmd,
|
.writearr = cmd,
|
||||||
},
|
},
|
||||||
NULL_SPI_CMD,
|
NULL_SPI_CMD,
|
||||||
|
@ -150,7 +150,7 @@ int main(int argc, char *argv[])
|
|||||||
const char *fn = NULL;
|
const char *fn = NULL;
|
||||||
const char *csn = NULL;
|
const char *csn = NULL;
|
||||||
enum ich_chipset cs = CHIPSET_ICH_UNKNOWN;
|
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) {
|
while ((opt = getopt(argc, argv, "df:c:")) != -1) {
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user