diff options
author | Sven Schnelle <svens@stackframe.org> | 2019-08-23 21:49:18 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2019-09-06 23:58:44 +0200 |
commit | 571ceb7d96952e8281bf780714773b850c403c3e (patch) | |
tree | 697eeef0902d55415682ff27732232089ad2ba10 /kernel/kexec_elf.c | |
parent | 3bd9c3366ee5c4e1b6ee8c8d9006ee559ec1d4ba (diff) |
kexec_elf: remove unused variable in kexec_elf_load()
base was never assigned, so we can remove it.
Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'kernel/kexec_elf.c')
-rw-r--r-- | kernel/kexec_elf.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/kernel/kexec_elf.c b/kernel/kexec_elf.c index 6c806ce96ac1..85f2bd177d6e 100644 --- a/kernel/kexec_elf.c +++ b/kernel/kexec_elf.c @@ -363,7 +363,7 @@ int kexec_elf_load(struct kimage *image, struct elfhdr *ehdr, struct kexec_buf *kbuf, unsigned long *lowest_load_addr) { - unsigned long base = 0, lowest_addr = UINT_MAX; + unsigned long lowest_addr = UINT_MAX; int ret; size_t i; @@ -385,7 +385,7 @@ int kexec_elf_load(struct kimage *image, struct elfhdr *ehdr, kbuf->bufsz = size; kbuf->memsz = phdr->p_memsz; kbuf->buf_align = phdr->p_align; - kbuf->buf_min = phdr->p_paddr + base; + kbuf->buf_min = phdr->p_paddr; kbuf->mem = KEXEC_BUF_MEM_UNKNOWN; ret = kexec_add_buffer(kbuf); if (ret) @@ -396,9 +396,6 @@ int kexec_elf_load(struct kimage *image, struct elfhdr *ehdr, lowest_addr = load_addr; } - /* Update entry point to reflect new load address. */ - ehdr->e_entry += base; - *lowest_load_addr = lowest_addr; ret = 0; out: |