Edward O'Callaghan submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Sam McNally: Looks good to me, approved
flashrom.c,flash.h: Kill dead fn shutdown_free()

Seems to be dead code with no call sites.

BUG=none
BRANCH=none
TEST=builds

Change-Id: Ic9f33415b8a357916891cb2006612cbf5e6aa559
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/46546
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sam McNally <sammc@google.com>
---
M flash.h
M flashrom.c
2 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/flash.h b/flash.h
index fefca9d..203d32d 100644
--- a/flash.h
+++ b/flash.h
@@ -54,7 +54,6 @@
#define PRIxPTR_WIDTH ((int)(sizeof(uintptr_t)*2))

int register_shutdown(int (*function) (void *data), void *data);
-int shutdown_free(void *data);
void *programmer_map_flash_region(const char *descr, uintptr_t phys_addr, size_t len);
void programmer_unmap_flash_region(void *virt_addr, size_t len);
void programmer_delay(unsigned int usecs);
diff --git a/flashrom.c b/flashrom.c
index c18a04f..26e2df8 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -553,12 +553,6 @@

static int check_block_eraser(const struct flashctx *flash, int k, int log);

-int shutdown_free(void *data)
-{
- free(data);
- return 0;
-}
-
/* Register a function to be executed on programmer shutdown.
* The advantage over atexit() is that you can supply a void pointer which will
* be used as parameter to the registered function upon programmer shutdown.

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

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ic9f33415b8a357916891cb2006612cbf5e6aa559
Gerrit-Change-Number: 46546
Gerrit-PatchSet: 2
Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Sam McNally <sammc@google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-MessageType: merged