Skip to content

Commit

Permalink
ACPI: Mark expected switch fall-throughs
Browse files Browse the repository at this point in the history
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Signed-off-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
GustavoARSilva authored and rafaeljw committed Nov 8, 2017
1 parent 39dae59 commit 1be9c3a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/acpi/ac.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ static void acpi_ac_notify(struct acpi_device *device, u32 event)
default:
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Unsupported event [0x%x]\n", event));
/* fall through */
case ACPI_AC_NOTIFY_STATUS:
case ACPI_NOTIFY_BUS_CHECK:
case ACPI_NOTIFY_DEVICE_CHECK:
Expand Down
1 change: 1 addition & 0 deletions drivers/acpi/acpi_processor.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ static int acpi_processor_errata_piix4(struct pci_dev *dev)
* PIIX4 models.
*/
errata.piix4.throttle = 1;
/* fall through*/

case 2: /* PIIX4E */
case 3: /* PIIX4M */
Expand Down
1 change: 1 addition & 0 deletions drivers/acpi/dock.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ int dock_notify(struct acpi_device *adev, u32 event)
surprise_removal = 1;
event = ACPI_NOTIFY_EJECT_REQUEST;
/* Fall back */
/* fall through */
case ACPI_NOTIFY_EJECT_REQUEST:
begin_undock(ds);
if ((immediate_undock && !(ds->flags & DOCK_IS_ATA))
Expand Down
1 change: 1 addition & 0 deletions drivers/acpi/resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ unsigned int acpi_dev_get_irq_type(int triggering, int polarity)
case ACPI_ACTIVE_BOTH:
if (triggering == ACPI_EDGE_SENSITIVE)
return IRQ_TYPE_EDGE_BOTH;
/* fall through */
default:
return IRQ_TYPE_NONE;
}
Expand Down

0 comments on commit 1be9c3a

Please sign in to comment.