Anastasia Klimchuk submitted this change.

View Change

Approvals: Aarya: Looks good to me, approved build bot (Jenkins): Verified Peter Marheine: Looks good to me, approved
flashrom.c: Rename {erase|write}_by_layout_new as the only one

We used to have two code paths for erase and write, so we had
{erase|write}_by_layout in two variants: *_new and *_legacy.
Now that legacy is removed, *_new can be renamed without *_new
suffix.

Change-Id: Ib21bf29e1993c4fc0516e76fde2ad283eedb50d2
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/83852
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aarya <aarya.chaumal@gmail.com>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
---
M flashrom.c
1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/flashrom.c b/flashrom.c
index 453a2bf..01a41c4 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -1327,7 +1327,7 @@
return ret;
}

-static int erase_by_layout_new(struct flashctx *const flashctx)
+static int erase_by_layout(struct flashctx *const flashctx)
{
bool all_skipped = true;
const uint32_t flash_size = flashctx->chip->total_size * 1024;
@@ -1370,12 +1370,7 @@
return ret;
}

-static int erase_by_layout(struct flashctx *const flashctx)
-{
- return erase_by_layout_new(flashctx);
-}
-
-static int write_by_layout_new(struct flashctx *const flashctx,
+static int write_by_layout(struct flashctx *const flashctx,
void *const curcontents, const void *const newcontents,
bool *all_skipped)
{
@@ -1410,13 +1405,6 @@
return ret;
}

-static int write_by_layout(struct flashctx *const flashctx,
- uint8_t *const curcontents, const uint8_t *const newcontents,
- bool *all_skipped)
-{
- return write_by_layout_new(flashctx, curcontents, newcontents, all_skipped);
-}
-
/**
* @brief Compares the included layout regions with content from a buffer.
*

To view, visit change 83852. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: Ib21bf29e1993c4fc0516e76fde2ad283eedb50d2
Gerrit-Change-Number: 83852
Gerrit-PatchSet: 2
Gerrit-Owner: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Aarya <aarya.chaumal@gmail.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Peter Marheine <pmarheine@chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>