From eefdf8656314f539e98b3c7a1f16810d73e5ef3a Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Mon, 15 May 2023 13:40:33 +1000 Subject: futility/updater.c: Drop redundant params to write_optional_firmware() BUG=b:282585789 BRANCH=none TEST=`cros_run_unit_tests --host --packages vboot_reference`. Change-Id: I3da2da752cc45a34b25616fea225654abe60a214 Signed-off-by: Edward O'Callaghan Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4532317 Commit-Queue: Edward O'Callaghan Tested-by: Edward O'Callaghan Reviewed-by: Nikolai Artemiev --- futility/updater.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/futility/updater.c b/futility/updater.c index 9c748845..5272b2e5 100644 --- a/futility/updater.c +++ b/futility/updater.c @@ -338,17 +338,14 @@ static int has_valid_update(struct updater_config *cfg, */ static int write_optional_firmware(struct updater_config *cfg, const struct firmware_image *image, - const char *section_name, - int check_programmer_wp, - int is_host) + const char *section_name) { /* * EC & PD may have different WP settings and we want to write * only if it is OK. */ - if (check_programmer_wp && is_write_protection_enabled(cfg)) { - ERROR("Target %s is write protected, skip updating.\n", - image->programmer); + if (is_write_protection_enabled(cfg)) { + ERROR("Target ec is write protected, skip updating.\n"); return 0; } @@ -854,10 +851,10 @@ static int update_ec_firmware(struct updater_config *cfg) int r = try_apply_quirk(QUIRK_EC_PARTIAL_RECOVERY, cfg); switch (r) { case EC_RECOVERY_FULL: - return write_optional_firmware(cfg, ec_image, NULL, 1, 0); + return write_optional_firmware(cfg, ec_image, NULL); case EC_RECOVERY_RO: - return write_optional_firmware(cfg, ec_image, "WP_RO", 1, 0); + return write_optional_firmware(cfg, ec_image, "WP_RO"); case EC_RECOVERY_DONE: /* Done by some quirks, for example EC RO software sync. */ -- cgit v1.2.1