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>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/64369
Original-Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-by: Thomas Heijligen <src@posteo.de>
Original-Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/71460
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/flash.h b/flash.h
index 7491335..a28f0f3 100644
--- a/flash.h
+++ b/flash.h
@@ -417,7 +417,6 @@
int probe_flash(struct registered_master *mst, int startchip, struct flashctx *fill_flash, int force);
int read_flash_to_file(struct flashctx *flash, const char *filename);
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 print_version(void);
void print_buildinfo(void);
void print_banner(void);
diff --git a/flashrom.c b/flashrom.c
index caee351..1048164 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -463,8 +463,8 @@
* @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,
- enum write_granularity gran, const uint8_t erased_value)
+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;
unsigned int i;