linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] ACPI: Fix fall-through warning for Clang
@ 2021-05-17 23:23 Gustavo A. R. Silva
  2021-05-21 17:05 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2021-05-17 23:23 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown
  Cc: linux-acpi, linux-kernel, Gustavo A. R. Silva, linux-hardening

In preparation to enable -Wimplicit-fallthrough for Clang, fix a
fallthrough warning by simply dropping the empty default case at
the bottom.

This contributes to the ongoing efforts to globally enable
-Wimplicit-fallthrough for Clang.

Link: https://github.com/KSPP/linux/issues/115
Suggested-by: Rafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/lkml/CAJZ5v0hLYWKX__oZdcCY0D20pNqpw8SkiTPOCNOtpqe--QLp4Q@mail.gmail.com/
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
 drivers/acpi/sbshc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c
index 53c2862c4c75..5c021c3b81d9 100644
--- a/drivers/acpi/sbshc.c
+++ b/drivers/acpi/sbshc.c
@@ -231,7 +231,6 @@ static int smbus_alarm(void *context)
 		case ACPI_SBS_BATTERY:
 			acpi_os_execute(OSL_NOTIFY_HANDLER,
 					acpi_smbus_callback, hc);
-		default:;
 	}
 	mutex_unlock(&hc->lock);
 	return 0;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH][next] ACPI: Fix fall-through warning for Clang
  2021-05-17 23:23 [PATCH][next] ACPI: Fix fall-through warning for Clang Gustavo A. R. Silva
@ 2021-05-21 17:05 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2021-05-21 17:05 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Rafael J. Wysocki, Len Brown, ACPI Devel Maling List,
	Linux Kernel Mailing List, linux-hardening

On Tue, May 18, 2021 at 1:22 AM Gustavo A. R. Silva
<gustavoars@kernel.org> wrote:
>
> In preparation to enable -Wimplicit-fallthrough for Clang, fix a
> fallthrough warning by simply dropping the empty default case at
> the bottom.
>
> This contributes to the ongoing efforts to globally enable
> -Wimplicit-fallthrough for Clang.
>
> Link: https://github.com/KSPP/linux/issues/115
> Suggested-by: Rafael J. Wysocki <rafael@kernel.org>
> Link: https://lore.kernel.org/lkml/CAJZ5v0hLYWKX__oZdcCY0D20pNqpw8SkiTPOCNOtpqe--QLp4Q@mail.gmail.com/
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> ---
>  drivers/acpi/sbshc.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c
> index 53c2862c4c75..5c021c3b81d9 100644
> --- a/drivers/acpi/sbshc.c
> +++ b/drivers/acpi/sbshc.c
> @@ -231,7 +231,6 @@ static int smbus_alarm(void *context)
>                 case ACPI_SBS_BATTERY:
>                         acpi_os_execute(OSL_NOTIFY_HANDLER,
>                                         acpi_smbus_callback, hc);
> -               default:;
>         }
>         mutex_unlock(&hc->lock);
>         return 0;
> --

Applied as 5.14 material, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-21 17:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-17 23:23 [PATCH][next] ACPI: Fix fall-through warning for Clang Gustavo A. R. Silva
2021-05-21 17:05 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).