From 37634642631daeb219b8c798239e19da42614c8a Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Mon, 15 May 2023 13:42:21 +1000 Subject: futility/updater.c: Rename write_optional_firmware() The function relates to the EC path. BUG=b:282585789 BRANCH=none TEST=`cros_run_unit_tests --host --packages vboot_reference`. Change-Id: I0da0df25f659404bd639a863a68a2b717d593d1d Signed-off-by: Edward O'Callaghan Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4532318 Commit-Queue: Edward O'Callaghan Tested-by: Edward O'Callaghan Reviewed-by: Nikolai Artemiev --- futility/updater.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/futility/updater.c b/futility/updater.c index 5272b2e5..da46704b 100644 --- a/futility/updater.c +++ b/futility/updater.c @@ -331,17 +331,16 @@ static int has_valid_update(struct updater_config *cfg, } /* - * Write a section from given firmware image to system firmware if possible. + * Write a section from given firmware image to system EC firmware if possible. * If section_name is NULL, write whole image. If the image has no data or if * the section does not exist, ignore and return success. * Returns 0 if success, non-zero if error. */ -static int write_optional_firmware(struct updater_config *cfg, +static int write_ec_firmware(struct updater_config *cfg, const struct firmware_image *image, const char *section_name) { - /* - * EC & PD may have different WP settings and we want to write + /** EC may have different WP settings and we want to write * only if it is OK. */ if (is_write_protection_enabled(cfg)) { @@ -851,10 +850,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); + return write_ec_firmware(cfg, ec_image, NULL); case EC_RECOVERY_RO: - return write_optional_firmware(cfg, ec_image, "WP_RO"); + return write_ec_firmware(cfg, ec_image, "WP_RO"); case EC_RECOVERY_DONE: /* Done by some quirks, for example EC RO software sync. */ -- cgit v1.2.1