diff options
author | Edward O'Callaghan <quasisec@google.com> | 2023-05-15 13:40:33 +1000 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-05-16 04:24:00 +0000 |
commit | eefdf8656314f539e98b3c7a1f16810d73e5ef3a (patch) | |
tree | 7a67102c6f907c35f14e97a040185274b0561c63 | |
parent | 494c71002dfc2b4c75b4af2dbcd3b188f8001a61 (diff) | |
download | vboot-eefdf8656314f539e98b3c7a1f16810d73e5ef3a.tar.gz |
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 <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4532317
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
-rw-r--r-- | futility/updater.c | 13 |
1 files 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. */ |