diff mbox series

[RFC,v2,69/78] hw/rdma/rdma_backend.c: add fallthrough pseudo-keyword

Message ID ef665a4bd46e9ae303d1db53bd008c6a76201ba0.1697183699.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, 7:57 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/rdma/rdma_backend.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c
index 6dcdfbbbe2..09e5ad961e 100644
--- a/hw/rdma/rdma_backend.c
+++ b/hw/rdma/rdma_backend.c
@@ -800,50 +800,50 @@  void rdma_backend_destroy_cq(RdmaBackendCQ *cq)
 int rdma_backend_create_qp(RdmaBackendQP *qp, uint8_t qp_type,
                            RdmaBackendPD *pd, RdmaBackendCQ *scq,
                            RdmaBackendCQ *rcq, RdmaBackendSRQ *srq,
                            uint32_t max_send_wr, uint32_t max_recv_wr,
                            uint32_t max_send_sge, uint32_t max_recv_sge)
 {
     struct ibv_qp_init_attr attr = {};
 
     qp->ibqp = 0;
 
     switch (qp_type) {
     case IBV_QPT_GSI:
         return 0;
 
     case IBV_QPT_RC:
-        /* fall through */
+        fallthrough;
     case IBV_QPT_UD:
         /* do nothing */
         break;
 
     default:
         rdma_error_report("Unsupported QP type %d", qp_type);
         return -EIO;
     }
 
     attr.qp_type = qp_type;
     attr.send_cq = scq->ibcq;
     attr.recv_cq = rcq->ibcq;
     attr.cap.max_send_wr = max_send_wr;
     attr.cap.max_recv_wr = max_recv_wr;
     attr.cap.max_send_sge = max_send_sge;
     attr.cap.max_recv_sge = max_recv_sge;
     if (srq) {
         attr.srq = srq->ibsrq;
     }
 
     qp->ibqp = ibv_create_qp(pd->ibpd, &attr);
     if (!qp->ibqp) {
         rdma_error_report("ibv_create_qp fail, errno=%d", errno);
         return -EIO;
     }
 
     rdma_protected_gslist_init(&qp->cqe_ctx_list);
 
     qp->ibpd = pd->ibpd;
 
     /* TODO: Query QP to get max_inline_data and save it to be used in send */
 
     return 0;
 }