From 9c3aed0269cf0e4fe1236e306847a1dde5796ff7 Mon Sep 17 00:00:00 2001 From: Anastasia Klimchuk Date: Fri, 9 Aug 2024 22:36:03 +1000 Subject: [PATCH] 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 Reviewed-on: https://review.coreboot.org/c/flashrom/+/83852 Tested-by: build bot (Jenkins) Reviewed-by: Aarya Reviewed-by: Peter Marheine --- flashrom.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/flashrom.c b/flashrom.c index 453a2bf71..01a41c4d3 100644 --- a/flashrom.c +++ b/flashrom.c @@ -1327,7 +1327,7 @@ static int selfcheck_eraseblocks(const struct flashchip *chip) 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 @@ _ret: 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 @@ _ret: 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. *