Skip to content

Commit 57d2dd4

Browse files
GustavoARSilvarafaeljw
authored andcommitted
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: Gustavo A. R. Silva <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent dcb7fd8 commit 57d2dd4

File tree

9 files changed

+12
-13
lines changed

9 files changed

+12
-13
lines changed

drivers/acpi/ac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ static void acpi_ac_notify(struct acpi_device *device, u32 event)
236236
default:
237237
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
238238
"Unsupported event [0x%x]\n", event));
239-
/* fall through */
239+
fallthrough;
240240
case ACPI_AC_NOTIFY_STATUS:
241241
case ACPI_NOTIFY_BUS_CHECK:
242242
case ACPI_NOTIFY_DEVICE_CHECK:

drivers/acpi/acpi_processor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ static int acpi_processor_errata_piix4(struct pci_dev *dev)
7979
* PIIX4 models.
8080
*/
8181
errata.piix4.throttle = 1;
82-
/* fall through*/
82+
fallthrough;
8383

8484
case 2: /* PIIX4E */
8585
case 3: /* PIIX4M */

drivers/acpi/button.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ static void acpi_button_notify(struct acpi_device *device, u32 event)
405405
switch (event) {
406406
case ACPI_FIXED_HARDWARE_EVENT:
407407
event = ACPI_BUTTON_NOTIFY_STATUS;
408-
/* fall through */
408+
fallthrough;
409409
case ACPI_BUTTON_NOTIFY_STATUS:
410410
input = button->input;
411411
if (button->type == ACPI_BUTTON_TYPE_LID) {

drivers/acpi/dock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ int dock_notify(struct acpi_device *adev, u32 event)
469469
surprise_removal = 1;
470470
event = ACPI_NOTIFY_EJECT_REQUEST;
471471
/* Fall back */
472-
/* fall through */
472+
fallthrough;
473473
case ACPI_NOTIFY_EJECT_REQUEST:
474474
begin_undock(ds);
475475
if ((immediate_undock && !(ds->flags & DOCK_IS_ATA))

drivers/acpi/evged.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ static acpi_status acpi_ged_request_interrupt(struct acpi_resource *ares,
106106

107107
if (ACPI_SUCCESS(acpi_get_handle(handle, ev_name, &evt_handle)))
108108
break;
109-
/* fall through */
109+
fallthrough;
110110
default:
111111
if (ACPI_SUCCESS(acpi_get_handle(handle, "_EVT", &evt_handle)))
112112
break;

drivers/acpi/processor_idle.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,7 @@ static void tsc_check_state(int state)
203203
*/
204204
if (boot_cpu_has(X86_FEATURE_NONSTOP_TSC))
205205
return;
206-
207-
/*FALL THROUGH*/
206+
fallthrough;
208207
default:
209208
/* TSC could halt in idle, so notify users */
210209
if (state > ACPI_STATE_C1)

drivers/acpi/resource.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ unsigned int acpi_dev_get_irq_type(int triggering, int polarity)
373373
case ACPI_ACTIVE_BOTH:
374374
if (triggering == ACPI_EDGE_SENSITIVE)
375375
return IRQ_TYPE_EDGE_BOTH;
376-
/* fall through */
376+
fallthrough;
377377
default:
378378
return IRQ_TYPE_NONE;
379379
}

drivers/acpi/spcr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
111111
table->serial_port.access_width))) {
112112
default:
113113
pr_err("Unexpected SPCR Access Width. Defaulting to byte size\n");
114-
/* fall through */
114+
fallthrough;
115115
case 8:
116116
iotype = "mmio";
117117
break;
@@ -128,7 +128,7 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
128128
switch (table->interface_type) {
129129
case ACPI_DBG2_ARM_SBSA_32BIT:
130130
iotype = "mmio32";
131-
/* fall through */
131+
fallthrough;
132132
case ACPI_DBG2_ARM_PL011:
133133
case ACPI_DBG2_ARM_SBSA_GENERIC:
134134
case ACPI_DBG2_BCM2835:

drivers/pci/pci-acpi.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -527,8 +527,8 @@ static void program_hpx_type3_register(struct pci_dev *dev,
527527
return;
528528

529529
break;
530-
case HPX_CFG_VEND_CAP: /* Fall through */
531-
case HPX_CFG_DVSEC: /* Fall through */
530+
case HPX_CFG_VEND_CAP:
531+
case HPX_CFG_DVSEC:
532532
default:
533533
pci_warn(dev, "Encountered _HPX type 3 with unsupported config space location");
534534
return;
@@ -1001,7 +1001,7 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
10011001
error = -EBUSY;
10021002
break;
10031003
}
1004-
/* Fall through */
1004+
fallthrough;
10051005
case PCI_D0:
10061006
case PCI_D1:
10071007
case PCI_D2:

0 commit comments

Comments
 (0)