aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2017-05-10 19:33:52 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-05-12 16:19:22 +1000
commite58aeb1ca304835d65beed98db7f118d3c154cd4 (patch)
tree32690504d15c0165771e97df75ce625afbfb284f
parent83b4d4cfeaecc3b08458dc94593aa6b36fcb5ae1 (diff)
downloadskiboot-e58aeb1ca304835d65beed98db7f118d3c154cd4.zip
skiboot-e58aeb1ca304835d65beed98db7f118d3c154cd4.tar.gz
skiboot-e58aeb1ca304835d65beed98db7f118d3c154cd4.tar.bz2
GCC7: fixes for -Wimplicit-fallthrough expected regexes
It turns out GCC7 adds a useful warning and does fancy things like parsing your comments to work out that you intended to do the fallthrough. There's a few places where we don't match the regex. Fix them, as it's harmless to do so. Found by building on Fedora Rawhide in Travis. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--core/pcie-slot.c3
-rw-r--r--hw/fsp/fsp-sysparam.c2
-rw-r--r--platforms/ibm-fsp/firenze-pci.c3
3 files changed, 5 insertions, 3 deletions
diff --git a/core/pcie-slot.c b/core/pcie-slot.c
index 022668a..1b7e24c 100644
--- a/core/pcie-slot.c
+++ b/core/pcie-slot.c
@@ -427,7 +427,8 @@ static int64_t pcie_slot_sm_freset(struct pci_slot *slot)
PCI_SLOT_STATE_FRESET_POWER_OFF);
return pci_slot_set_sm_timeout(slot, msecs_to_tb(50));
}
- /* No power state change, fall through */
+ /* No power state change, */
+ /* fallthrough */
case PCI_SLOT_STATE_FRESET_POWER_OFF:
PCIE_SLOT_DBG(slot, "FRESET: Power is off, turn on\n");
pcie_slot_set_power_state_ext(slot, PCI_SLOT_POWER_ON, false);
diff --git a/hw/fsp/fsp-sysparam.c b/hw/fsp/fsp-sysparam.c
index 2dbf05c..5d7ae91 100644
--- a/hw/fsp/fsp-sysparam.c
+++ b/hw/fsp/fsp-sysparam.c
@@ -100,7 +100,7 @@ static int fsp_sysparam_process(struct sysparam_req *r)
case 0x00: /* XXX Is that even possible ? */
case 0x11: /* Data in request */
memcpy(r->ubuf, &r->resp.data.words[2], len);
- /* pass through */
+ /* fallthrough */
case 0x12: /* Data in TCE */
stlen = len;
break;
diff --git a/platforms/ibm-fsp/firenze-pci.c b/platforms/ibm-fsp/firenze-pci.c
index 1b8b5dc..0a93387 100644
--- a/platforms/ibm-fsp/firenze-pci.c
+++ b/platforms/ibm-fsp/firenze-pci.c
@@ -505,7 +505,8 @@ static int64_t firenze_pci_slot_freset(struct pci_slot *slot)
msecs_to_tb(FIRENZE_PCI_SLOT_DELAY));
}
- /* Fall through: Power is off, turn it on */
+ /* Power is off, turn it on */
+ /* Fallthrough */
case FIRENZE_PCI_SLOT_FRESET_POWER_OFF:
/* Update last power status */
pval = (uint8_t *)(plat_slot->req->rw_buf);