Edward O'Callaghan submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Arthur Heymans: Looks good to me, approved Thomas Heijligen: Looks good to me, approved Angel Pons: Looks good to me, approved
flashrom.c: Make need_erase() helper static local

The need_erase() helper is only used within flashrom.c

Change-Id: Ic0946bb109fca2fc18e15eefa11cccea284ded0b
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/64369
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Thomas Heijligen <src@posteo.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
---
M flashrom.c
M include/flash.h
2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/flashrom.c b/flashrom.c
index e8ed87e..7f54488 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -480,7 +480,7 @@
* @gran write granularity (enum, not count)
* @return 0 if no erase is needed, 1 otherwise
*/
-int need_erase(const uint8_t *have, const uint8_t *want, unsigned int len,
+static int need_erase(const uint8_t *have, const uint8_t *want, unsigned int len,
enum write_granularity gran, const uint8_t erased_value)
{
int result = 0;
diff --git a/include/flash.h b/include/flash.h
index 5170ba7..89d5737 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -411,7 +411,6 @@
int erase_flash(struct flashctx *flash);
int probe_flash(struct registered_master *mst, int startchip, struct flashctx *fill_flash, int force);
int verify_range(struct flashctx *flash, const uint8_t *cmpbuf, unsigned int start, unsigned int len);
-int need_erase(const uint8_t *have, const uint8_t *want, unsigned int len, enum write_granularity gran, const uint8_t erased_value);
void emergency_help_message(void);
void print_version(void);
void print_buildinfo(void);

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

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ic0946bb109fca2fc18e15eefa11cccea284ded0b
Gerrit-Change-Number: 64369
Gerrit-PatchSet: 2
Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Thomas Heijligen <src@posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged