All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI / ACPI: Mark expected switch fall-through
@ 2018-10-04 15:40 Gustavo A. R. Silva
  2018-10-04 20:52 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-04 15:40 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Bjorn Helgaas
  Cc: linux-acpi, linux-pci, linux-kernel, 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")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] PCI / ACPI: Mark expected switch fall-through
  2018-10-04 15:40 [PATCH] PCI / ACPI: Mark expected switch fall-through Gustavo A. R. Silva
@ 2018-10-04 20:52 ` Bjorn Helgaas
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2018-10-04 20:52 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Rafael J. Wysocki, Len Brown, Bjorn Helgaas, linux-acpi,
	linux-pci, linux-kernel

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
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-04 20:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-04 15:40 [PATCH] PCI / ACPI: Mark expected switch fall-through Gustavo A. R. Silva
2018-10-04 20:52 ` Bjorn Helgaas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.