Skip to contentSkip to conversation

ACPI: Fix fall-through warning for Clang

PATCH Applied Gustavo A. R. Silva 2 participants 2 messages May 17, 2021 – May 21, 2021 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI: Fix fall-through warning for Clang

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.

---
 drivers/acpi/sbshc.c | 1 -
 1 file changed, 1 deletion(-)
drivers/acpi/sbshc.c +0 -1
index 53c2862c4c75..5c021c3b81d9 100644
@@ -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;
Signature · 1 line
2.27.0
maintainer Applied
#1 lore raw
Quoted 21 lines · Gustavo A. R. Silva

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.

---
 drivers/acpi/sbshc.c | 1 -
 1 file changed, 1 deletion(-)
drivers/acpi/sbshc.c +0 -0
index 53c2862c4c75..5c021c3b81d9 100644

drivers/acpi/sbshc.c static int smbus_alarm(void *context)

Quoted 8 lines
drivers/acpi/sbshc.c +0 -2
@@ -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!