Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/nmi: Annotate s390_handle_damage() with __noreturn

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

Remove the unreachable infinite while loop.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>

authored by

Thorsten Blum and committed by
Heiko Carstens
f07ebfa5 858063c1

+1 -2
+1 -2
arch/s390/kernel/nmi.c
··· 184 184 sclp_emergency_printk(message); 185 185 } 186 186 187 - static notrace void s390_handle_damage(void) 187 + static notrace void __noreturn s390_handle_damage(void) 188 188 { 189 189 struct lowcore *lc = get_lowcore(); 190 190 union ctlreg0 cr0, cr0_new; ··· 214 214 lc->mcck_new_psw = psw_save; 215 215 local_ctl_load(0, &cr0.reg); 216 216 disabled_wait(); 217 - while (1); 218 217 } 219 218 NOKPROBE_SYMBOL(s390_handle_damage); 220 219