Anastasia Klimchuk has submitted this change. ( https://review.coreboot.org/c/flashrom/+/66890 )
Change subject: spi25.c: Retype appropriate variables with bool ......................................................................
spi25.c: Retype appropriate variables with bool
Use the bool type instead of an integer for appropriate variables, since this represents their purpose much better.
Signed-off-by: Felix Singer felixsinger@posteo.net Change-Id: Icd7e6478848c6f72817da16a5350d450bcc0bb5d Reviewed-on: https://review.coreboot.org/c/flashrom/+/66890 Reviewed-by: Anastasia Klimchuk aklm@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M spi25.c 1 file changed, 22 insertions(+), 5 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved Anastasia Klimchuk: Looks good to me, approved
diff --git a/spi25.c b/spi25.c index 4454106..6d160eb 100644 --- a/spi25.c +++ b/spi25.c @@ -37,7 +37,7 @@ };
static struct { - int is_cached; + bool is_cached; unsigned char bytes[4]; /* enough to hold largest ID type */ } id_cache[NUM_ID_TYPES];
@@ -167,7 +167,7 @@ msg_cinfo("%d byte RDID not supported on this SPI controller\n", bytes); if (ret) return 0; - id_cache[idty].is_cached = 1; + id_cache[idty].is_cached = true; }
rdid_get_ids(id_cache[idty].bytes, bytes, &id1, &id2); @@ -191,7 +191,7 @@ if (!id_cache[REMS].is_cached) { if (spi_rems(flash, id_cache[REMS].bytes)) return 0; - id_cache[REMS].is_cached = 1; + id_cache[REMS].is_cached = true; }
id1 = id_cache[REMS].bytes[0]; @@ -247,7 +247,7 @@ if (!id_cache[RES2].is_cached) { if (spi_res(flash, id_cache[RES2].bytes, 2)) return 0; - id_cache[RES2].is_cached = 1; + id_cache[RES2].is_cached = true; }
id1 = id_cache[RES2].bytes[0]; @@ -267,7 +267,7 @@ if (!id_cache[RES3].is_cached) { if (spi_res(flash, id_cache[RES3].bytes, 3)) return 0; - id_cache[RES3].is_cached = 1; + id_cache[RES3].is_cached = true; }
id1 = (id_cache[RES3].bytes[0] << 8) | id_cache[RES3].bytes[1];