Re: [PATCH] reboot: add missing break to switch statement for LINUX_REBOOT_CMD_HALT
From: Dan Carpenter
Date: Wed Aug 14 2024 - 11:47:40 EST
On Wed, Aug 14, 2024 at 04:24:45PM +0200, Enno Onneken wrote:
> All switch-cases should be isolated from each other due to shutting
> down/rebooting the kernel in different ways.
> In order to fully isolate this case (like all the others are), this patch
> adds a "break;" after do_exit(0); .
This patch is obviously harmless but the commit message is not clear what the
motivation is. "missing break" in the subject is misleading.
do_exit() is annotated as a __noreturn function so it's already "fully
isolated". It sounds like you are using a tool which doesn't understand the
no return attributes. Better to fix that instead.
>
> Fixes: 15d94b82565e ("reboot: move shutdown/reboot related functions to kernel/reboot.c")
This isn't a bugfix so a Fixes tag isn't appropriate.
regards,
dan carpenter