From 86295cb4530dfbc2315ca5997502dad03748e5dd Mon Sep 17 00:00:00 2001 From: Alexander Gordeev Date: Mon, 3 Apr 2023 08:44:37 +0200 Subject: [PATCH] s390/kdump: cleanup do_start_kdump() prototype and usage Avoid unnecessary run-time and compile-time type conversions of do_start_kdump() function return value and parameter. Signed-off-by: Alexander Gordeev Reviewed-by: Heiko Carstens Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik --- arch/s390/kernel/machine_kexec.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c index eb473fc835b23..3e0fd01a192aa 100644 --- a/arch/s390/kernel/machine_kexec.c +++ b/arch/s390/kernel/machine_kexec.c @@ -111,9 +111,8 @@ static noinline void __machine_kdump(void *image) store_status(__do_machine_kdump, image); } -static unsigned long do_start_kdump(unsigned long addr) +static int do_start_kdump(struct kimage *image) { - struct kimage *image = (struct kimage *) addr; int (*start_kdump)(int) = (void *)image->start; int rc; @@ -134,8 +133,8 @@ static bool kdump_csum_valid(struct kimage *image) int rc; preempt_disable(); - rc = call_on_stack(1, S390_lowcore.nodat_stack, unsigned long, do_start_kdump, - unsigned long, (unsigned long)image); + rc = call_on_stack(1, S390_lowcore.nodat_stack, int, do_start_kdump, + struct kimage *, image); preempt_enable(); return rc == 0; #else -- 2.30.2