projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d4bd441
)
x86/boot/setup: Clean up the e820_reserve_setup_data() code
author
Wei Yang
<weiyang@linux.vnet.ibm.com>
Thu, 4 Jun 2015 06:18:49 +0000
(14:18 +0800)
committer
Ingo Molnar
<mingo@kernel.org>
Fri, 5 Jun 2015 11:53:22 +0000
(13:53 +0200)
Deobfuscate the 'found' logic, it can be replaced with a simple:
if (!pa_data)
return;
and 'found' can be eliminated.
Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Yinghai Lu <yinghai@kernel.org>
Link:
http://lkml.kernel.org/r/1433398729-8314-1-git-send-email-weiyang@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/setup.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/x86/kernel/setup.c
b/arch/x86/kernel/setup.c
index d74ac33290ae3eeef46b923c4556d644b72f0d5a..c3992c3a4378c2ebe4dcfe601d8b07297f970394 100644
(file)
--- a/
arch/x86/kernel/setup.c
+++ b/
arch/x86/kernel/setup.c
@@
-461,19
+461,18
@@
static void __init e820_reserve_setup_data(void)
{
struct setup_data *data;
u64 pa_data;
- int found = 0;
pa_data = boot_params.hdr.setup_data;
+ if (!pa_data)
+ return;
+
while (pa_data) {
data = early_memremap(pa_data, sizeof(*data));
e820_update_range(pa_data, sizeof(*data)+data->len,
E820_RAM, E820_RESERVED_KERN);
- found = 1;
pa_data = data->next;
early_memunmap(data, sizeof(*data));
}
- if (!found)
- return;
sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map);
memcpy(&e820_saved, &e820, sizeof(struct e820map));