diff options
author | Arvind Sankar <nivedita@alum.mit.edu> | 2020-07-29 00:57:09 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2020-07-31 11:08:17 +0200 |
commit | ef7b07d59e2f18042622cecde0c7a89b60f33a89 (patch) | |
tree | cfe4cd382eca76ab9e877c3132ae4e2270bc6922 /arch/x86/boot/compressed | |
parent | x86/kaslr: Eliminate 'start_orig' local variable from __process_mem_region() (diff) | |
download | linux-ef7b07d59e2f18042622cecde0c7a89b60f33a89.tar.xz linux-ef7b07d59e2f18042622cecde0c7a89b60f33a89.zip |
x86/kaslr: Drop redundant variable in __process_mem_region()
region.size can be trimmed to store the portion of the region before the
overlap, instead of a separate mem_vector variable.
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20200728225722.67457-9-nivedita@alum.mit.edu
Diffstat (limited to 'arch/x86/boot/compressed')
-rw-r--r-- | arch/x86/boot/compressed/kaslr.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c index e978c3508814..8cc47faea56d 100644 --- a/arch/x86/boot/compressed/kaslr.c +++ b/arch/x86/boot/compressed/kaslr.c @@ -664,11 +664,8 @@ static void __process_mem_region(struct mem_vector *entry, /* Store beginning of region if holds at least image_size. */ if (overlap.start >= region.start + image_size) { - struct mem_vector beginning; - - beginning.start = region.start; - beginning.size = overlap.start - region.start; - process_gb_huge_pages(&beginning, image_size); + region.size = overlap.start - region.start; + process_gb_huge_pages(®ion, image_size); } /* Return if overlap extends to or past end of region. */ |