Anastasia Klimchuk has submitted this change. ( https://review.coreboot.org/c/flashrom/+/66891 )
Change subject: tree: Retype variable `laptop_ok` with bool ......................................................................
tree: Retype variable `laptop_ok` with bool
Use the bool type instead of an integer for the variable `laptop_ok`, since this represents its purpose much better.
Signed-off-by: Felix Singer felixsinger@posteo.net Change-Id: I5d9fc3516bc2d29f11b056e35b3e5e324ce93423 Reviewed-on: https://review.coreboot.org/c/flashrom/+/66891 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com Reviewed-by: Anastasia Klimchuk aklm@chromium.org --- M board_enable.c M chipset_enable.c M include/programmer.h M internal.c 4 files changed, 25 insertions(+), 7 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved Anastasia Klimchuk: Looks good to me, approved
diff --git a/board_enable.c b/board_enable.c index 3d9ec21..4903c0f 100644 --- a/board_enable.c +++ b/board_enable.c @@ -22,6 +22,7 @@
#include <strings.h> #include <string.h> +#include <stdbool.h> #include <stdlib.h> #include "flash.h" #include "programmer.h" @@ -2292,7 +2293,7 @@ static int p2_whitelist_laptop(void) { is_laptop = 1; - laptop_ok = 1; + laptop_ok = true; msg_pdbg("Whitelisted laptop detected.\n"); return 0; } diff --git a/chipset_enable.c b/chipset_enable.c index ae06989..d6103c1 100644 --- a/chipset_enable.c +++ b/chipset_enable.c @@ -826,7 +826,7 @@
/* Suppress unknown laptop warning if we booted from SPI. */ if (boot_buses & BUS_SPI) - laptop_ok = 1; + laptop_ok = true;
return 0; } @@ -971,7 +971,7 @@
/* Suppress unknown laptop warning if we booted from SPI. */ if (!ret && (boot_buses & BUS_SPI)) - laptop_ok = 1; + laptop_ok = true;
_freepci_ret: pci_free_dev(spi_dev); @@ -1087,7 +1087,7 @@
/* Suppress unknown laptop warning if we booted from SPI. */ if (boot_buses & BUS_SPI) - laptop_ok = 1; + laptop_ok = true;
return 0; } @@ -1676,7 +1676,7 @@
/* Suppress unknown laptop warning if we booted from SPI. */ if (!ret && want_spi) - laptop_ok = 1; + laptop_ok = true;
return ret; } diff --git a/include/programmer.h b/include/programmer.h index abb7cfd..a7cea5e 100644 --- a/include/programmer.h +++ b/include/programmer.h @@ -265,7 +265,7 @@
#if CONFIG_INTERNAL == 1 extern int is_laptop; -extern int laptop_ok; +extern bool laptop_ok; extern bool force_boardenable; extern bool force_boardmismatch; void probe_superio(void); diff --git a/internal.c b/internal.c index ce1debe..43aa51b 100644 --- a/internal.c +++ b/internal.c @@ -28,7 +28,7 @@ #endif
int is_laptop = 0; -int laptop_ok = 0; +bool laptop_ok = false;
bool force_boardenable = false; bool force_boardmismatch = false;