diff mbox series

[RFC,v3,71/78] hw/s390x: add fallthrough pseudo-keyword

Message ID 6e4db77a017893c302d1ed7ba2eb526800f7b629.1697186560.git.manos.pitsidianakis@linaro.org (mailing list archive)
State New, archived
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.

Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>
---
 hw/s390x/ipl.c           | 1 +
 hw/s390x/s390-pci-inst.c | 4 ++--
 hw/s390x/sclp.c          | 4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
index 515dcf51b5..da2333846f 100644
--- a/hw/s390x/ipl.c
+++ b/hw/s390x/ipl.c
@@ -429,6 +429,7 @@  static bool s390_gen_initial_iplb(S390IPLState *ipl)
         case CCW_DEVTYPE_VIRTIO_NET:
             ipl->netboot = true;
             /* Fall through to CCW_DEVTYPE_VIRTIO case */
+            fallthrough;
         case CCW_DEVTYPE_VIRTIO:
             ipl->iplb.len = cpu_to_be32(S390_IPLB_MIN_CCW_LEN);
             ipl->iplb.blk0_len =
diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c
index 30149546c0..171320384c 100644
--- a/hw/s390x/s390-pci-inst.c
+++ b/hw/s390x/s390-pci-inst.c
@@ -1380,10 +1380,10 @@  int stpcifc_service_call(S390CPU *cpu, uint8_t r1, uint64_t fiba, uint8_t ar,
      * FH Enabled bit is set to one in states of ENABLED, BLOCKED or ERROR. */
     case ZPCI_FS_ERROR:
         fib.fc |= 0x20;
-        /* fallthrough */
+        fallthrough;
     case ZPCI_FS_BLOCKED:
         fib.fc |= 0x40;
-        /* fallthrough */
+        fallthrough;
     case ZPCI_FS_ENABLED:
         fib.fc |= 0x80;
         if (pbdev->iommu->enabled) {
diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c
index eff74479f4..9b8c7ff043 100644
--- a/hw/s390x/sclp.c
+++ b/hw/s390x/sclp.c
@@ -66,7 +66,7 @@  static bool sccb_verify_boundary(uint64_t sccb_addr, uint16_t sccb_len,
         if (s390_has_feat(S390_FEAT_EXTENDED_LENGTH_SCCB)) {
             return true;
         }
-        /* fallthrough */
+        fallthrough;
     default:
         if (sccb_max_addr < sccb_boundary) {
             return true;
@@ -224,7 +224,7 @@  static void sclp_configure_io_adapter(SCLPDevice *sclp, SCCB *sccb,
             }
             return;
         }
-        /* fallthrough */
+        fallthrough;
     default:
         rc = SCLP_RC_ADAPTER_TYPE_NOT_RECOGNIZED;
     }