Commit 57d2dd4b authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Rafael J. Wysocki

ACPI: Use fallthrough pseudo-keyword

Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through # [1]
Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent dcb7fd82
...@@ -236,7 +236,7 @@ static void acpi_ac_notify(struct acpi_device *device, u32 event) ...@@ -236,7 +236,7 @@ static void acpi_ac_notify(struct acpi_device *device, u32 event)
default: default:
ACPI_DEBUG_PRINT((ACPI_DB_INFO, ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Unsupported event [0x%x]\n", event)); "Unsupported event [0x%x]\n", event));
/* fall through */ fallthrough;
case ACPI_AC_NOTIFY_STATUS: case ACPI_AC_NOTIFY_STATUS:
case ACPI_NOTIFY_BUS_CHECK: case ACPI_NOTIFY_BUS_CHECK:
case ACPI_NOTIFY_DEVICE_CHECK: case ACPI_NOTIFY_DEVICE_CHECK:
......
...@@ -79,7 +79,7 @@ static int acpi_processor_errata_piix4(struct pci_dev *dev) ...@@ -79,7 +79,7 @@ static int acpi_processor_errata_piix4(struct pci_dev *dev)
* PIIX4 models. * PIIX4 models.
*/ */
errata.piix4.throttle = 1; errata.piix4.throttle = 1;
/* fall through*/ fallthrough;
case 2: /* PIIX4E */ case 2: /* PIIX4E */
case 3: /* PIIX4M */ case 3: /* PIIX4M */
......
...@@ -405,7 +405,7 @@ static void acpi_button_notify(struct acpi_device *device, u32 event) ...@@ -405,7 +405,7 @@ static void acpi_button_notify(struct acpi_device *device, u32 event)
switch (event) { switch (event) {
case ACPI_FIXED_HARDWARE_EVENT: case ACPI_FIXED_HARDWARE_EVENT:
event = ACPI_BUTTON_NOTIFY_STATUS; event = ACPI_BUTTON_NOTIFY_STATUS;
/* fall through */ fallthrough;
case ACPI_BUTTON_NOTIFY_STATUS: case ACPI_BUTTON_NOTIFY_STATUS:
input = button->input; input = button->input;
if (button->type == ACPI_BUTTON_TYPE_LID) { if (button->type == ACPI_BUTTON_TYPE_LID) {
......
...@@ -469,7 +469,7 @@ int dock_notify(struct acpi_device *adev, u32 event) ...@@ -469,7 +469,7 @@ int dock_notify(struct acpi_device *adev, u32 event)
surprise_removal = 1; surprise_removal = 1;
event = ACPI_NOTIFY_EJECT_REQUEST; event = ACPI_NOTIFY_EJECT_REQUEST;
/* Fall back */ /* Fall back */
/* fall through */ fallthrough;
case ACPI_NOTIFY_EJECT_REQUEST: case ACPI_NOTIFY_EJECT_REQUEST:
begin_undock(ds); begin_undock(ds);
if ((immediate_undock && !(ds->flags & DOCK_IS_ATA)) if ((immediate_undock && !(ds->flags & DOCK_IS_ATA))
......
...@@ -106,7 +106,7 @@ static acpi_status acpi_ged_request_interrupt(struct acpi_resource *ares, ...@@ -106,7 +106,7 @@ static acpi_status acpi_ged_request_interrupt(struct acpi_resource *ares,
if (ACPI_SUCCESS(acpi_get_handle(handle, ev_name, &evt_handle))) if (ACPI_SUCCESS(acpi_get_handle(handle, ev_name, &evt_handle)))
break; break;
/* fall through */ fallthrough;
default: default:
if (ACPI_SUCCESS(acpi_get_handle(handle, "_EVT", &evt_handle))) if (ACPI_SUCCESS(acpi_get_handle(handle, "_EVT", &evt_handle)))
break; break;
......
...@@ -203,8 +203,7 @@ static void tsc_check_state(int state) ...@@ -203,8 +203,7 @@ static void tsc_check_state(int state)
*/ */
if (boot_cpu_has(X86_FEATURE_NONSTOP_TSC)) if (boot_cpu_has(X86_FEATURE_NONSTOP_TSC))
return; return;
fallthrough;
/*FALL THROUGH*/
default: default:
/* TSC could halt in idle, so notify users */ /* TSC could halt in idle, so notify users */
if (state > ACPI_STATE_C1) if (state > ACPI_STATE_C1)
......
...@@ -373,7 +373,7 @@ unsigned int acpi_dev_get_irq_type(int triggering, int polarity) ...@@ -373,7 +373,7 @@ unsigned int acpi_dev_get_irq_type(int triggering, int polarity)
case ACPI_ACTIVE_BOTH: case ACPI_ACTIVE_BOTH:
if (triggering == ACPI_EDGE_SENSITIVE) if (triggering == ACPI_EDGE_SENSITIVE)
return IRQ_TYPE_EDGE_BOTH; return IRQ_TYPE_EDGE_BOTH;
/* fall through */ fallthrough;
default: default:
return IRQ_TYPE_NONE; return IRQ_TYPE_NONE;
} }
......
...@@ -111,7 +111,7 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console) ...@@ -111,7 +111,7 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
table->serial_port.access_width))) { table->serial_port.access_width))) {
default: default:
pr_err("Unexpected SPCR Access Width. Defaulting to byte size\n"); pr_err("Unexpected SPCR Access Width. Defaulting to byte size\n");
/* fall through */ fallthrough;
case 8: case 8:
iotype = "mmio"; iotype = "mmio";
break; break;
...@@ -128,7 +128,7 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console) ...@@ -128,7 +128,7 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
switch (table->interface_type) { switch (table->interface_type) {
case ACPI_DBG2_ARM_SBSA_32BIT: case ACPI_DBG2_ARM_SBSA_32BIT:
iotype = "mmio32"; iotype = "mmio32";
/* fall through */ fallthrough;
case ACPI_DBG2_ARM_PL011: case ACPI_DBG2_ARM_PL011:
case ACPI_DBG2_ARM_SBSA_GENERIC: case ACPI_DBG2_ARM_SBSA_GENERIC:
case ACPI_DBG2_BCM2835: case ACPI_DBG2_BCM2835:
......
...@@ -527,8 +527,8 @@ static void program_hpx_type3_register(struct pci_dev *dev, ...@@ -527,8 +527,8 @@ static void program_hpx_type3_register(struct pci_dev *dev,
return; return;
break; break;
case HPX_CFG_VEND_CAP: /* Fall through */ case HPX_CFG_VEND_CAP:
case HPX_CFG_DVSEC: /* Fall through */ case HPX_CFG_DVSEC:
default: default:
pci_warn(dev, "Encountered _HPX type 3 with unsupported config space location"); pci_warn(dev, "Encountered _HPX type 3 with unsupported config space location");
return; return;
...@@ -1001,7 +1001,7 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state) ...@@ -1001,7 +1001,7 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
error = -EBUSY; error = -EBUSY;
break; break;
} }
/* Fall through */ fallthrough;
case PCI_D0: case PCI_D0:
case PCI_D1: case PCI_D1:
case PCI_D2: case PCI_D2:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment