Anastasia Klimchuk has uploaded this change for review.

View Change

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>
---
M flashrom.c
1 file changed, 2 insertions(+), 14 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/52/83852/1
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: newchange
Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: Ib21bf29e1993c4fc0516e76fde2ad283eedb50d2
Gerrit-Change-Number: 83852
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm@chromium.org>