diff mbox series

[next] ACPI: Fix fall-through warning for Clang

Message ID 20210517232312.GA43474@embeddedor
State Accepted
Commit 45b10e3e0170b925251464f238420c2b9ea9d998
Headers show
Series [next] ACPI: Fix fall-through warning for Clang | expand

Commit Message

Gustavo A. R. Silva May 17, 2021, 11:23 p.m. UTC
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(-)

Comments

Rafael J. Wysocki May 21, 2021, 5:05 p.m. UTC | #1
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!
diff mbox series

Patch

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;