From 18cf3f7966de1f805fe3fe9f4abfbb99f435f3ab Mon Sep 17 00:00:00 2001 From: Zheng Bao Date: Sat, 9 Mar 2024 12:38:16 +0800 Subject: amdfwtool: Compact the parameter transfering Remove redundant parameter "debug" from open_process_config(). Change-Id: Ib91a505838d7be4980d6b4f1e95fb8601fbbfd16 Signed-off-by: Zheng Bao Reviewed-on: https://review.coreboot.org/c/coreboot/+/81201 Reviewed-by: Fred Reitberger Reviewed-by: Felix Held Tested-by: build bot (Jenkins) --- util/amdfwtool/amdfwtool.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'util/amdfwtool/amdfwtool.c') diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c index 35d6cdf259..ef97010829 100644 --- a/util/amdfwtool/amdfwtool.c +++ b/util/amdfwtool/amdfwtool.c @@ -1469,7 +1469,7 @@ static int set_efs_table(uint8_t soc_id, amd_cb_config *cb_config, return 0; } -void open_process_config(char *config, amd_cb_config *cb_config, int debug) +void open_process_config(char *config, amd_cb_config *cb_config) { FILE *config_handle; @@ -1490,7 +1490,7 @@ void open_process_config(char *config, amd_cb_config *cb_config, int debug) } /* For debug. */ - if (debug) { + if (cb_config->debug) { dump_psp_firmwares(amd_psp_fw_table); dump_bdt_firmwares(amd_bios_table); } @@ -1539,7 +1539,7 @@ int main(int argc, char **argv) memcpy(ctx.amd_bios_table_clean, amd_bios_table, sizeof(amd_bios_table)); } - open_process_config(cb_config.config, &cb_config, cb_config.debug); + open_process_config(cb_config.config, &cb_config); ctx.rom = malloc(ctx.rom_size); if (!ctx.rom) { @@ -1625,8 +1625,7 @@ int main(int argc, char **argv) memcpy(amd_bios_table, ctx.amd_bios_table_clean, sizeof(amd_bios_table)); assert_fw_entry(combo_index, MAX_COMBO_ENTRIES, &ctx); - open_process_config(cb_config.combo_config[combo_index], &cb_config, - cb_config.debug); + open_process_config(cb_config.combo_config[combo_index], &cb_config); /* In most cases, the address modes are same. */ if (cb_config.need_ish) -- cgit v1.2.3