Skip to contentSkip to conversation

x86/reboot: Remove dead code after machine_real_restart()

PATCH In review Noah Burchell 1 participant 2 messages Nov 2 – Nov 16 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/reboot: Remove dead code after machine_real_restart()

machine_real_restart() is __noreturn and ends in unreachable(), so the reboot_type assignment and the break after it in the BOOT_BIOS case can never execute.

Remove them. No functional change.

---
 arch/x86/kernel/reboot.c | 4 ----
 1 file changed, 4 deletions(-)
arch/x86/kernel/reboot.c +0 -4
index 0fed6d0d7..28f938a3b 100644
@@ -635,10 +635,6 @@ static void native_machine_emergency_restart(void)
 		case BOOT_BIOS:
 			machine_real_restart(MRR_BIOS);
 
-			/* We're probably dead after this, but... */
-			reboot_type = BOOT_CF9_SAFE;
-			break;
-
 		case BOOT_CF9_FORCE:
 			port_cf9_safe = true;
 			fallthrough;
Signature · 1 line
2.56.0
#1 lore raw
Quoted 3 lines · Noah Burchell

machine_real_restart() is __noreturn and ends in unreachable(), so the reboot_type assignment and the break after it in the BOOT_BIOS case can never execute.

Gentle ping.

Thanks,
Noah