Re: [PATCH v3 7/7] kexec_elf: remove unused variable in kexec_elf_load()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Le 10/07/2019 à 16:29, Sven Schnelle a écrit :
base was never unsigned, so we can remove it.

Do you mean never assigned ?



Signed-off-by: Sven Schnelle <svens@xxxxxxxxxxxxxx>

Reviewed-by: Christophe Leroy <christophe.leroy@xxxxxx>

---
  kernel/kexec_elf.c | 7 ++-----
  1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/kernel/kexec_elf.c b/kernel/kexec_elf.c
index b7e47ddd7cad..a56ec5481e71 100644
--- a/kernel/kexec_elf.c
+++ b/kernel/kexec_elf.c
@@ -348,7 +348,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;
@@ -370,7 +370,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;
  		ret = kexec_add_buffer(kbuf);
  		if (ret)
  			goto out;
@@ -380,9 +380,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:


_______________________________________________
kexec mailing list
kexec@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/kexec




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux