diff options
| author | ye xingchen <[email protected]> | 2022-09-29 12:29:34 +0800 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2022-11-18 13:55:07 -0800 |
| commit | 32d0c98e428a3ec483d5d342983db467d7324f2b (patch) | |
| tree | 6677cc8ea83a1eaa5b410b7bca53d0ee387a1cfd | |
| parent | 12b9d301ff73122aebd78548fa4c04ca69ed78fe (diff) | |
kexec: remove the unneeded result variable
Return the value kimage_add_entry() directly instead of storing it in
another redundant variable.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: ye xingchen <[email protected]>
Signed-off-by: Baoquan He <[email protected]>
Reported-by: Zeal Robot <[email protected]>
Acked-by: Baoquan He <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Chen Lifu <[email protected]>
Cc: "Eric W . Biederman" <[email protected]>
Cc: Jianglei Nie <[email protected]>
Cc: Li Chen <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Petr Mladek <[email protected]>
Cc: Russell King <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
| -rw-r--r-- | kernel/kexec_core.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c index ca2743f9c634..969e8f52f7da 100644 --- a/kernel/kexec_core.c +++ b/kernel/kexec_core.c @@ -561,23 +561,17 @@ static int kimage_add_entry(struct kimage *image, kimage_entry_t entry) static int kimage_set_destination(struct kimage *image, unsigned long destination) { - int result; - destination &= PAGE_MASK; - result = kimage_add_entry(image, destination | IND_DESTINATION); - return result; + return kimage_add_entry(image, destination | IND_DESTINATION); } static int kimage_add_page(struct kimage *image, unsigned long page) { - int result; - page &= PAGE_MASK; - result = kimage_add_entry(image, page | IND_SOURCE); - return result; + return kimage_add_entry(image, page | IND_SOURCE); } |