Skip to contentSkip to conversation

PCI / ACPI: Mark expected switch fall-through

PATCH Applied Gustavo A. R. Silva 2 participants 2 messages Oct 4, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI / ACPI: Mark expected switch fall-through

In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.

Addresses-Coverity-ID: 1472052 ("Missing break in switch")

---
 drivers/pci/pci-acpi.c | 1 +
 1 file changed, 1 insertion(+)
drivers/pci/pci-acpi.c +1 -0
index 79c8e95..2a4aa64 100644
@@ -588,6 +588,7 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
 			error = -EBUSY;
 			break;
 		}
+		/* Fall through */
 	case PCI_D0:
 	case PCI_D1:
 	case PCI_D2:
Signature · 1 line
2.7.4
#1 lore raw
Quoted 5 lines · Gustavo A. R. Silva

In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.

Addresses-Coverity-ID: 1472052 ("Missing break in switch")

Applied to pci/misc for v4.20, thanks!

Quoted 19 lines
---
 drivers/pci/pci-acpi.c | 1 +
 1 file changed, 1 insertion(+)
drivers/pci/pci-acpi.c +1 -0
index 79c8e95..2a4aa64 100644
@@ -588,6 +588,7 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
 			error = -EBUSY;
 			break;
 		}
+		/* Fall through */
 	case PCI_D0:
 	case PCI_D1:
 	case PCI_D2:
Signature · 1 line
2.7.4