Re: [PATCH 064/141] ACPI: Fix fall-through warnings for Clang

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 20, 2020 at 7:34 PM Gustavo A. R. Silva
<gustavoars@xxxxxxxxxx> wrote:
>
> In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
> by explicitly adding a break statement instead of letting the code fall
> through to the next case.
>
> Link: https://github.com/KSPP/linux/issues/115
> Signed-off-by: Gustavo A. R. Silva <gustavoars@xxxxxxxxxx>
> ---
>  drivers/acpi/sbshc.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c
> index 53c2862c4c75..0b3de0e63633 100644
> --- a/drivers/acpi/sbshc.c
> +++ b/drivers/acpi/sbshc.c
> @@ -231,6 +231,7 @@ static int smbus_alarm(void *context)
>                 case ACPI_SBS_BATTERY:
>                         acpi_os_execute(OSL_NOTIFY_HANDLER,
>                                         acpi_smbus_callback, hc);
> +                       break;
>                 default:;

Why don't you simply drop the default case below (it's empty anyway)?

>         }
>         mutex_unlock(&hc->lock);
> --
> 2.27.0
>



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux