diff mbox series

PCI / ACPI: Mark expected switch fall-through

Message ID 20181004154041.GA28767@embeddedor.com (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show
Series PCI / ACPI: Mark expected switch fall-through | expand

Commit Message

Gustavo A. R. Silva Oct. 4, 2018, 3:40 p.m. UTC
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 1472052 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/pci/pci-acpi.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Bjorn Helgaas Oct. 4, 2018, 8:52 p.m. UTC | #1
On Thu, Oct 04, 2018 at 05:40:41PM +0200, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Addresses-Coverity-ID: 1472052 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

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

> ---
>  drivers/pci/pci-acpi.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
> index 79c8e95..2a4aa64 100644
> --- a/drivers/pci/pci-acpi.c
> +++ b/drivers/pci/pci-acpi.c
> @@ -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:
> -- 
> 2.7.4
>
diff mbox series

Patch

diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index 79c8e95..2a4aa64 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -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: