summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZheng Bao <fishbaozi@gmail.com>2024-03-09 12:38:16 +0800
committerFelix Held <felix-coreboot@felixheld.de>2024-03-18 14:56:29 +0000
commit18cf3f7966de1f805fe3fe9f4abfbb99f435f3ab (patch)
tree74d62e2a480b1fcea5cf669bcbe4570f9d48f45e
parentd22c2c8772b5775fed7130011dda87de8bc9eb13 (diff)
amdfwtool: Compact the parameter transfering
Remove redundant parameter "debug" from open_process_config(). Change-Id: Ib91a505838d7be4980d6b4f1e95fb8601fbbfd16 Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81201 Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--util/amdfwtool/amdfwtool.c9
1 files changed, 4 insertions, 5 deletions
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)