PCI: Mark expected switch fall-through
authorMathieu Malaterre <malat@debian.org>
Mon, 14 Jan 2019 20:41:36 +0000 (21:41 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 14 Jan 2019 22:56:04 +0000 (16:56 -0600)
There is a plan to build the kernel with -Wimplicit-fallthrough and
these places in the code produced warnings (W=1).  Fix them up.

Signed-off-by: Mathieu Malaterre <malat@debian.org>
[bhelgaas: squash into one patch, drop extra changelog detail]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pci.c
drivers/pci/quirks.c

index c9d8e3c837de785d7960897f511328e1399239ae..94069fc35e912f2d06cade921581deb40f014175 100644 (file)
@@ -861,7 +861,7 @@ static int pci_raw_set_power_state(struct pci_dev *dev, pci_power_t state)
                if ((pmcsr & PCI_PM_CTRL_STATE_MASK) == PCI_D3hot
                 && !(pmcsr & PCI_PM_CTRL_NO_SOFT_RESET))
                        need_restore = true;
-               /* Fall-through: force to D0 */
+               /* Fall-through - force to D0 */
        default:
                pmcsr = 0;
                break;
@@ -2260,7 +2260,7 @@ static pci_power_t pci_target_state(struct pci_dev *dev, bool wakeup)
                case PCI_D2:
                        if (pci_no_d1d2(dev))
                                break;
-                       /* else: fall through */
+                       /* else, fall through */
                default:
                        target_state = state;
                }
index b0a413f3f7cabbdc0ccf5f0f9b06c137c5144cc8..9fabcef345ed94cb7e678ec8433a0c6a6368b15a 100644 (file)
@@ -2138,7 +2138,7 @@ static void quirk_netmos(struct pci_dev *dev)
                if (dev->subsystem_vendor == PCI_VENDOR_ID_IBM &&
                                dev->subsystem_device == 0x0299)
                        return;
-               /* else: fall through */
+               /* else, fall through */
        case PCI_DEVICE_ID_NETMOS_9735:
        case PCI_DEVICE_ID_NETMOS_9745:
        case PCI_DEVICE_ID_NETMOS_9845: