[PATCH 1/8] kexec_file: Remove unused members from struct kexec_buf.
Thiago Jung Bauermann
bauerman at linux.vnet.ibm.com
Sat Jun 11 20:10:15 PDT 2016
kexec_add_buffer uses kexec_buf.buffer and kexec_buf.bufsz to pass along
its own arguments buffer and bufsz, but since they aren't used anywhere
else, it's pointless.
Cc: Eric Biederman <ebiederm at xmission.com>
Cc: kexec at lists.infradead.org
Cc: linux-kernel at vger.kernel.org
---
kernel/kexec_file.c | 6 ++----
kernel/kexec_internal.h | 2 --
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
index 01ab82a40d22..b6eec7527e9f 100644
--- a/kernel/kexec_file.c
+++ b/kernel/kexec_file.c
@@ -464,8 +464,6 @@ int kexec_add_buffer(struct kimage *image, char *buffer, unsigned long bufsz,
memset(&buf, 0, sizeof(struct kexec_buf));
kbuf = &buf;
kbuf->image = image;
- kbuf->buffer = buffer;
- kbuf->bufsz = bufsz;
kbuf->memsz = ALIGN(memsz, PAGE_SIZE);
kbuf->buf_align = max(buf_align, PAGE_SIZE);
@@ -489,8 +487,8 @@ int kexec_add_buffer(struct kimage *image, char *buffer, unsigned long bufsz,
/* Found a suitable memory range */
ksegment = &image->segment[image->nr_segments];
- ksegment->kbuf = kbuf->buffer;
- ksegment->bufsz = kbuf->bufsz;
+ ksegment->kbuf = buffer;
+ ksegment->bufsz = bufsz;
ksegment->mem = kbuf->mem;
ksegment->memsz = kbuf->memsz;
image->nr_segments++;
diff --git a/kernel/kexec_internal.h b/kernel/kexec_internal.h
index 0a52315d9c62..eefd5bf960c2 100644
--- a/kernel/kexec_internal.h
+++ b/kernel/kexec_internal.h
@@ -26,8 +26,6 @@ struct kexec_sha_region {
*/
struct kexec_buf {
struct kimage *image;
- char *buffer;
- unsigned long bufsz;
unsigned long mem;
unsigned long memsz;
unsigned long buf_align;
--
1.9.1
More information about the kexec
mailing list