projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2965faa
)
kexec: remove unnecessary test in kimage_alloc_crash_control_pages()
author
Minfei Huang
<
[email protected]
>
Wed, 9 Sep 2015 22:38:58 +0000
(15:38 -0700)
committer
Linus Torvalds
<
[email protected]
>
Thu, 10 Sep 2015 20:29:01 +0000
(13:29 -0700)
Transforming PFN(Page Frame Number) to struct page is never failure, so we
can simplify the code logic to do the image->control_page assignment
directly in the loop, and remove the unnecessary conditional judgement.
Signed-off-by: Minfei Huang <
[email protected]
>
Acked-by: Dave Young <
[email protected]
>
Acked-by: Vivek Goyal <
[email protected]
>
Cc: Simon Horman <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
kernel/kexec_core.c
patch
|
blob
|
history
diff --git
a/kernel/kexec_core.c
b/kernel/kexec_core.c
index 9aa25c034b2ef4b30c769171db9525b7a0e1d5cc..9ffc96b65d9a891b98ffd03c723420a67522f179 100644
(file)
--- a/
kernel/kexec_core.c
+++ b/
kernel/kexec_core.c
@@
-439,11
+439,10
@@
static struct page *kimage_alloc_crash_control_pages(struct kimage *image,
/* If I don't overlap any segments I have found my hole! */
if (i == image->nr_segments) {
pages = pfn_to_page(hole_start >> PAGE_SHIFT);
+ image->control_page = hole_end;
break;
}
}
- if (pages)
- image->control_page = hole_end;
return pages;
}