Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <gustavoars@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Gustavo A. R. Silva and committed by
Rafael J. Wysocki
57d2dd4b dcb7fd82

+12 -13
+1 -1
drivers/acpi/ac.c
··· 236 236 default: 237 237 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 238 238 "Unsupported event [0x%x]\n", event)); 239 - /* fall through */ 239 + fallthrough; 240 240 case ACPI_AC_NOTIFY_STATUS: 241 241 case ACPI_NOTIFY_BUS_CHECK: 242 242 case ACPI_NOTIFY_DEVICE_CHECK:
+1 -1
drivers/acpi/acpi_processor.c
··· 79 79 * PIIX4 models. 80 80 */ 81 81 errata.piix4.throttle = 1; 82 - /* fall through*/ 82 + fallthrough; 83 83 84 84 case 2: /* PIIX4E */ 85 85 case 3: /* PIIX4M */
+1 -1
drivers/acpi/button.c
··· 405 405 switch (event) { 406 406 case ACPI_FIXED_HARDWARE_EVENT: 407 407 event = ACPI_BUTTON_NOTIFY_STATUS; 408 - /* fall through */ 408 + fallthrough; 409 409 case ACPI_BUTTON_NOTIFY_STATUS: 410 410 input = button->input; 411 411 if (button->type == ACPI_BUTTON_TYPE_LID) {
+1 -1
drivers/acpi/dock.c
··· 469 469 surprise_removal = 1; 470 470 event = ACPI_NOTIFY_EJECT_REQUEST; 471 471 /* Fall back */ 472 - /* fall through */ 472 + fallthrough; 473 473 case ACPI_NOTIFY_EJECT_REQUEST: 474 474 begin_undock(ds); 475 475 if ((immediate_undock && !(ds->flags & DOCK_IS_ATA))
+1 -1
drivers/acpi/evged.c
··· 106 106 107 107 if (ACPI_SUCCESS(acpi_get_handle(handle, ev_name, &evt_handle))) 108 108 break; 109 - /* fall through */ 109 + fallthrough; 110 110 default: 111 111 if (ACPI_SUCCESS(acpi_get_handle(handle, "_EVT", &evt_handle))) 112 112 break;
+1 -2
drivers/acpi/processor_idle.c
··· 203 203 */ 204 204 if (boot_cpu_has(X86_FEATURE_NONSTOP_TSC)) 205 205 return; 206 - 207 - /*FALL THROUGH*/ 206 + fallthrough; 208 207 default: 209 208 /* TSC could halt in idle, so notify users */ 210 209 if (state > ACPI_STATE_C1)
+1 -1
drivers/acpi/resource.c
··· 373 373 case ACPI_ACTIVE_BOTH: 374 374 if (triggering == ACPI_EDGE_SENSITIVE) 375 375 return IRQ_TYPE_EDGE_BOTH; 376 - /* fall through */ 376 + fallthrough; 377 377 default: 378 378 return IRQ_TYPE_NONE; 379 379 }
+2 -2
drivers/acpi/spcr.c
··· 111 111 table->serial_port.access_width))) { 112 112 default: 113 113 pr_err("Unexpected SPCR Access Width. Defaulting to byte size\n"); 114 - /* fall through */ 114 + fallthrough; 115 115 case 8: 116 116 iotype = "mmio"; 117 117 break; ··· 128 128 switch (table->interface_type) { 129 129 case ACPI_DBG2_ARM_SBSA_32BIT: 130 130 iotype = "mmio32"; 131 - /* fall through */ 131 + fallthrough; 132 132 case ACPI_DBG2_ARM_PL011: 133 133 case ACPI_DBG2_ARM_SBSA_GENERIC: 134 134 case ACPI_DBG2_BCM2835:
+3 -3
drivers/pci/pci-acpi.c
··· 527 527 return; 528 528 529 529 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: 532 532 default: 533 533 pci_warn(dev, "Encountered _HPX type 3 with unsupported config space location"); 534 534 return; ··· 1001 1001 error = -EBUSY; 1002 1002 break; 1003 1003 } 1004 - /* Fall through */ 1004 + fallthrough; 1005 1005 case PCI_D0: 1006 1006 case PCI_D1: 1007 1007 case PCI_D2: