Skip to content

Commit

Permalink
kexec: remove never used member destination in kimage
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Cc: Vivek Goyal <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Baoquan He authored and torvalds committed Feb 17, 2015
1 parent 1df0135 commit 73d7e3e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
2 changes: 0 additions & 2 deletions include/linux/kexec.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ struct kimage {
kimage_entry_t *entry;
kimage_entry_t *last_entry;

unsigned long destination;

unsigned long start;
struct page *control_code_page;
struct page *swap_page;
Expand Down
4 changes: 0 additions & 4 deletions kernel/kexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit 73d7e3e

Please sign in to comment.