From: ye xingchen Date: Thu, 29 Sep 2022 04:29:34 +0000 (+0800) Subject: kexec: remove the unneeded result variable X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=32d0c98e428a3ec483d5d342983db467d7324f2b;p=linux.git 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/20220929042936.22012-3-bhe@redhat.com Signed-off-by: ye xingchen Signed-off-by: Baoquan He Reported-by: Zeal Robot Acked-by: Baoquan He Cc: Benjamin Herrenschmidt Cc: Chen Lifu Cc: "Eric W . Biederman" Cc: Jianglei Nie Cc: Li Chen Cc: Michael Ellerman Cc: Paul Mackerras Cc: Petr Mladek Cc: Russell King Signed-off-by: Andrew Morton --- diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c index ca2743f9c634e..969e8f52f7da9 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); }