diff mbox series

[1/4] remoteproc: Remove unused function rproc_elf_sanity_check

Message ID 20200913002821.404022-2-seanga2@gmail.com
State Superseded
Delegated to: Tom Rini
Headers show
Series dm: Print device name in dev_xxx() like Linux | expand

Commit Message

Sean Anderson Sept. 13, 2020, 12:28 a.m. UTC
This function is never used anywhere, and it also tries to log with a
nonexistant device.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
---

 drivers/remoteproc/rproc-elf-loader.c | 16 ----------------
 include/remoteproc.h                  | 13 -------------
 2 files changed, 29 deletions(-)

Comments

Simon Glass Sept. 17, 2020, 1:09 a.m. UTC | #1
On Sat, 12 Sep 2020 at 18:28, Sean Anderson <seanga2@gmail.com> wrote:
>
> This function is never used anywhere, and it also tries to log with a
> nonexistant device.
>
> Signed-off-by: Sean Anderson <seanga2@gmail.com>
> ---
>
>  drivers/remoteproc/rproc-elf-loader.c | 16 ----------------
>  include/remoteproc.h                  | 13 -------------
>  2 files changed, 29 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/drivers/remoteproc/rproc-elf-loader.c b/drivers/remoteproc/rproc-elf-loader.c
index c464ecebb7..b185a6cafb 100644
--- a/drivers/remoteproc/rproc-elf-loader.c
+++ b/drivers/remoteproc/rproc-elf-loader.c
@@ -158,22 +158,6 @@  int rproc_elf64_sanity_check(ulong addr, ulong size)
 	return 0;
 }
 
-/* Basic function to verify ELF image format */
-int rproc_elf_sanity_check(ulong addr, ulong size)
-{
-	Elf32_Ehdr *ehdr = (Elf32_Ehdr *)addr;
-
-	if (!addr) {
-		dev_err(dev, "Invalid firmware address\n");
-		return -EFAULT;
-	}
-
-	if (ehdr->e_ident[EI_CLASS] == ELFCLASS64)
-		return rproc_elf64_sanity_check(addr, size);
-	else
-		return rproc_elf32_sanity_check(addr, size);
-}
-
 int rproc_elf32_load_image(struct udevice *dev, unsigned long addr, ulong size)
 {
 	Elf32_Ehdr *ehdr; /* Elf header structure pointer */
diff --git a/include/remoteproc.h b/include/remoteproc.h
index a903acb9b2..74d01723f6 100644
--- a/include/remoteproc.h
+++ b/include/remoteproc.h
@@ -226,19 +226,6 @@  int rproc_elf32_sanity_check(ulong addr, ulong size);
  */
 int rproc_elf64_sanity_check(ulong addr, ulong size);
 
-/**
- * rproc_elf_sanity_check() - Verify if an image is a valid ELF one
- *
- * Check if a valid ELF image exists at the given memory location. Auto
- * detects ELF32/ELF64 and verifies basic ELF64/ELF32 format requirements
- * like magic number and sections size.
- *
- * @addr:	address of the image to verify
- * @size:	size of the image
- * @return 0 if the image looks good, else appropriate error value.
- */
-int rproc_elf_sanity_check(ulong addr, ulong size);
-
 /**
  * rproc_elf32_load_image() - load an ELF32 image
  * @dev:	device loading the ELF32 image