[PATCH v2 1/3] s390/kdump: Mark __do_machine_kexec as __noreturn

Thorsten Blum
2025-11-14T11:04:37Z

__do_machine_kexec() ends by calling the non-returning function
disabled_wait() and therefore also never returns. Annotate it with the
__noreturn attribute to improve compiler optimizations.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
Changes in v2:
- Drop the first two patches from the series because store_status() does
return to the caller (Heiko)
- Link to v1: https://lore.kernel.org/lkml/20251110132803.1520-1-thorsten.blum@linux.dev/
---
arch/s390/kernel/machine_kexec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c
index baeb3dcfc1c8..9be6f58a6553 100644
--- a/arch/s390/kernel/machine_kexec.c
+++ b/arch/s390/kernel/machine_kexec.c
@@ -224,7 +224,7 @@ void machine_crash_shutdown(struct pt_regs *regs)
/*
* Do normal kexec
*/
-static void __do_machine_kexec(void *data)
+static void __noreturn __do_machine_kexec(void *data)
{
unsigned long data_mover, entry, diag308_subcode;
struct kimage *image = data;
--
2.51.1