diff mbox series

[RFC,v3,68/78] hw/pci: add fallthrough pseudo-keyword

Message ID 932525c602493a94e42afef3400c27c7e3be4694.1697186560.git.manos.pitsidianakis@linaro.org
State New
Headers show
Series Strict disable implicit fallthrough | expand

Commit Message

Manos Pitsidianakis Oct. 13, 2023, 8:46 a.m. UTC
In preparation of raising -Wimplicit-fallthrough to 5, replace all
fall-through comments with the fallthrough attribute pseudo-keyword.

Signed-off-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>
---
 hw/pci/pcie_aer.c | 3 ++-
 hw/pci/pcie_doe.c | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/hw/pci/pcie_aer.c b/hw/pci/pcie_aer.c
index b68c7ecb49..c99ecce2a1 100644
--- a/hw/pci/pcie_aer.c
+++ b/hw/pci/pcie_aer.c
@@ -151,8 +151,9 @@  int pcie_aer_init(PCIDevice *dev, uint8_t cap_ver, uint16_t offset,
     switch (pcie_cap_get_type(dev)) {
     case PCI_EXP_TYPE_ROOT_PORT:
         /* this case will be set by pcie_aer_root_init() */
-        /* fallthrough */
+        fallthrough;
     case PCI_EXP_TYPE_DOWNSTREAM:
+        fallthrough;
     case PCI_EXP_TYPE_UPSTREAM:
         pci_word_test_and_set_mask(dev->wmask + PCI_BRIDGE_CONTROL,
                                    PCI_BRIDGE_CTL_SERR);
diff --git a/hw/pci/pcie_doe.c b/hw/pci/pcie_doe.c
index 2210f86968..f04a36e664 100644
--- a/hw/pci/pcie_doe.c
+++ b/hw/pci/pcie_doe.c
@@ -360,7 +360,7 @@  void pcie_doe_write_config(DOECap *doe_cap,
         doe_cap->write_mbox_len++;
         break;
     case PCI_EXP_DOE_CAP:
-        /* fallthrough */
+        fallthrough;
     default:
         break;
     }