From e29ff72b779426c7fe462ead93c7ad77fe562935 Mon Sep 17 00:00:00 2001 From: Clement Leger Date: Wed, 22 Apr 2020 11:30:17 +0200 Subject: remoteproc: remove rproc_elf32_sanity_check Since checks are present in the remoteproc elf loader before calling da_to_va, loading a elf64 will work on 32bits flavors of kernel. Indeed, if a segment size is larger than what size_t can hold, the loader will return an error so the functionality is equivalent to what exists today. Acked-by: Suman Anna Signed-off-by: Clement Leger Link: https://lore.kernel.org/r/20200422093017.10985-1-cleger@kalray.eu Signed-off-by: Bjorn Andersson --- drivers/remoteproc/remoteproc_elf_loader.c | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'drivers/remoteproc/remoteproc_elf_loader.c') diff --git a/drivers/remoteproc/remoteproc_elf_loader.c b/drivers/remoteproc/remoteproc_elf_loader.c index 4869fb7d8fe4..df68d87752e4 100644 --- a/drivers/remoteproc/remoteproc_elf_loader.c +++ b/drivers/remoteproc/remoteproc_elf_loader.c @@ -112,27 +112,6 @@ int rproc_elf_sanity_check(struct rproc *rproc, const struct firmware *fw) } EXPORT_SYMBOL(rproc_elf_sanity_check); -/** - * rproc_elf_sanity_check() - Sanity Check ELF32 firmware image - * @rproc: the remote processor handle - * @fw: the ELF32 firmware image - * - * Make sure this fw image is sane. - */ -int rproc_elf32_sanity_check(struct rproc *rproc, const struct firmware *fw) -{ - int ret = rproc_elf_sanity_check(rproc, fw); - - if (ret) - return ret; - - if (fw_elf_get_class(fw) == ELFCLASS32) - return 0; - - return -EINVAL; -} -EXPORT_SYMBOL(rproc_elf32_sanity_check); - /** * rproc_elf_get_boot_addr() - Get rproc's boot address. * @rproc: the remote processor handle -- cgit