[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1466538521-31216-2-git-send-email-bauerman@linux.vnet.ibm.com>
Date: Tue, 21 Jun 2016 16:48:33 -0300
From: Thiago Jung Bauermann <bauerman@...ux.vnet.ibm.com>
To: linuxppc-dev@...ts.ozlabs.org
Cc: kexec@...ts.infradead.org, linux-kernel@...r.kernel.org,
Thiago Jung Bauermann <bauerman@...ux.vnet.ibm.com>,
Eric Biederman <ebiederm@...ssion.com>
Subject: [PATCH v3 1/9] kexec_file: Remove unused members from struct kexec_buf.
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.
Signed-off-by: Thiago Jung Bauermann <bauerman@...ux.vnet.ibm.com>
Cc: Eric Biederman <ebiederm@...ssion.com>
Cc: kexec@...ts.infradead.org
Cc: linux-kernel@...r.kernel.org
Acked-by: Dave Young <dyoung@...hat.com>
---
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
Powered by blists - more mailing lists