summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorBaoquan He <bhe@redhat.com>2015-02-18 00:45:44 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-18 01:34:51 +0300
commit73d7e3eac01da3cef32ab25cbc6a36a6202c4ea6 (patch)
treec8e8ae31c8e46cca84aac8bde9b0919126cfafd5 /kernel
parent1df0135588ed4e6048c1608ec046e9a38ea91e8e (diff)
downloadlinux-73d7e3eac01da3cef32ab25cbc6a36a6202c4ea6.tar.xz
kexec: remove never used member destination in kimage
struct kimage has a member destination which is used to store the real destination address of each page when load segment from user space buffer to kernel. But we never retrieve the value stored in kimage->destination, so this member variable in kimage and its assignment operation are redundent code. I guess for_each_kimage_entry just does the work that kimage->destination is expected to do. So in this patch just make a cleanup to remove it. Signed-off-by: Baoquan He <bhe@redhat.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/kexec.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/kernel/kexec.c b/kernel/kexec.c
index c85277639b34..35dcac4b5c1c 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -856,8 +856,6 @@ static int kimage_set_destination(struct kimage *image,
destination &= PAGE_MASK;
result = kimage_add_entry(image, destination | IND_DESTINATION);
- if (result == 0)
- image->destination = destination;
return result;
}
@@ -869,8 +867,6 @@ static int kimage_add_page(struct kimage *image, unsigned long page)
page &= PAGE_MASK;
result = kimage_add_entry(image, page | IND_SOURCE);
- if (result == 0)
- image->destination += PAGE_SIZE;
return result;
}