Skip to content

Commit f07ebfa

Browse files
tobluxhcahca
authored andcommitted
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>
1 parent 858063c commit f07ebfa

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

arch/s390/kernel/nmi.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ static notrace void nmi_print_info(void)
184184
sclp_emergency_printk(message);
185185
}
186186

187-
static notrace void s390_handle_damage(void)
187+
static notrace void __noreturn s390_handle_damage(void)
188188
{
189189
struct lowcore *lc = get_lowcore();
190190
union ctlreg0 cr0, cr0_new;
@@ -214,7 +214,6 @@ static notrace void s390_handle_damage(void)
214214
lc->mcck_new_psw = psw_save;
215215
local_ctl_load(0, &cr0.reg);
216216
disabled_wait();
217-
while (1);
218217
}
219218
NOKPROBE_SYMBOL(s390_handle_damage);
220219

0 commit comments

Comments
 (0)