diff options
author | Zheng Bao <fishbaozi@gmail.com> | 2021-11-04 18:56:47 +0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-11-05 12:56:19 +0000 |
commit | ba3af5e2ff3608f2be5e318e20d60686228a1c97 (patch) | |
tree | 342abe747eee7f14d1e6513eb4d3de7e820e8fd4 /util/amdfwtool/data_parse.c | |
parent | edd1e360f42859e5cb777470192ab1cfc3e2b82e (diff) |
amdfwtool: Change the flag value to type bool
Change-Id: I8bb87e6b16b323b26dd5b411e0063e2e9e333d05
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58942
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'util/amdfwtool/data_parse.c')
-rw-r--r-- | util/amdfwtool/data_parse.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/util/amdfwtool/data_parse.c b/util/amdfwtool/data_parse.c index 784ee67026..8f93183827 100644 --- a/util/amdfwtool/data_parse.c +++ b/util/amdfwtool/data_parse.c @@ -108,7 +108,7 @@ static uint8_t find_register_fw_filename_psp_dir(char *fw_name, char *filename, uint8_t subprog; if (strcmp(fw_name, "PSPBTLDR_WL_FILE") == 0) { - if (cb_config->have_whitelist == 1) { + if (cb_config->have_whitelist) { fw_type = AMD_FW_PSP_BOOTLOADER_AB; subprog = 0; } else { @@ -160,14 +160,14 @@ static uint8_t find_register_fw_filename_psp_dir(char *fw_name, char *filename, fw_type = AMD_FW_PSP_SMU_FIRMWARE2; subprog = 2; } else if (strcmp(fw_name, "PSP_SEC_DBG_KEY_FILE") == 0) { - if (cb_config->unlock_secure == 1) { + if (cb_config->unlock_secure) { fw_type = AMD_FW_PSP_SECURED_DEBUG; subprog = 0; } else { fw_type = AMD_FW_SKIP; } } else if (strcmp(fw_name, "PSP_SEC_DEBUG_FILE") == 0) { - if (cb_config->unlock_secure == 1) { + if (cb_config->unlock_secure) { fw_type = AMD_DEBUG_UNLOCK; subprog = 0; } else { @@ -198,7 +198,7 @@ static uint8_t find_register_fw_filename_psp_dir(char *fw_name, char *filename, fw_type = AMD_ABL7; subprog = 0; } else if (strcmp(fw_name, "PSPSECUREOS_FILE") == 0) { - if (cb_config->use_secureos == 1) { + if (cb_config->use_secureos) { fw_type = AMD_FW_PSP_SECURED_OS; subprog = 0; } else { @@ -231,21 +231,21 @@ static uint8_t find_register_fw_filename_psp_dir(char *fw_name, char *filename, fw_type = AMD_SEC_GASKET; subprog = 2; } else if (strcmp(fw_name, "PSP_MP2FW0_FILE") == 0) { - if (cb_config->load_mp2_fw == 1) { + if (cb_config->load_mp2_fw) { fw_type = AMD_MP2_FW; subprog = 0; } else { fw_type = AMD_FW_SKIP; } } else if (strcmp(fw_name, "PSP_MP2FW1_FILE") == 0) { - if (cb_config->load_mp2_fw == 1) { + if (cb_config->load_mp2_fw) { fw_type = AMD_MP2_FW; subprog = 1; } else { fw_type = AMD_FW_SKIP; } } else if (strcmp(fw_name, "PSP_MP2FW2_FILE") == 0) { - if (cb_config->load_mp2_fw == 1) { + if (cb_config->load_mp2_fw) { fw_type = AMD_MP2_FW; subprog = 2; } else { @@ -255,7 +255,7 @@ static uint8_t find_register_fw_filename_psp_dir(char *fw_name, char *filename, fw_type = AMD_DRIVER_ENTRIES; subprog = 0; } else if (strcmp(fw_name, "PSP_S0I3_FILE") == 0) { - if (cb_config->s0i3 == 1) { + if (cb_config->s0i3) { fw_type = AMD_S0I3_DRIVER; subprog = 0; } else { @@ -295,7 +295,7 @@ static uint8_t find_register_fw_filename_psp_dir(char *fw_name, char *filename, fw_type = AMD_RPMC_NVRAM; subprog = 0; } else if (strcmp(fw_name, "PSPBTLDR_AB_FILE") == 0) { - if (cb_config->have_whitelist == 0) { + if (!cb_config->have_whitelist) { fw_type = AMD_FW_PSP_BOOTLOADER_AB; subprog = 0; } else { @@ -372,7 +372,7 @@ static uint8_t find_register_fw_filename_bios_dir(char *fw_name, char *filename, subprog = 0; instance = 0; } else if (strcmp(fw_name, "PSP_MP2CFG_FILE") == 0) { - if (cb_config->load_mp2_fw == 1) { + if (cb_config->load_mp2_fw) { fw_type = AMD_BIOS_MP2_CFG; subprog = 0; } else { |