IB/mlx5: Suppress gcc 7 fall-through complaints
authorBart Van Assche <bart.vanassche@wdc.com>
Wed, 11 Oct 2017 17:49:07 +0000 (10:49 -0700)
committerDoug Ledford <dledford@redhat.com>
Sun, 15 Oct 2017 00:47:06 +0000 (20:47 -0400)
Avoid that gcc 7 reports the following warning when building with W=1:

warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/cq.c
drivers/infiniband/hw/mlx5/qp.c

index 2aa53f427685997a9e4c6ec776857536a3fca26a..b8a116d0e0635814287ef1201462e7e2c5f9e6a5 100644 (file)
@@ -124,11 +124,13 @@ static void handle_good_req(struct ib_wc *wc, struct mlx5_cqe64 *cqe,
        switch (be32_to_cpu(cqe->sop_drop_qpn) >> 24) {
        case MLX5_OPCODE_RDMA_WRITE_IMM:
                wc->wc_flags |= IB_WC_WITH_IMM;
+               /* fall through */
        case MLX5_OPCODE_RDMA_WRITE:
                wc->opcode    = IB_WC_RDMA_WRITE;
                break;
        case MLX5_OPCODE_SEND_IMM:
                wc->wc_flags |= IB_WC_WITH_IMM;
+               /* fall through */
        case MLX5_OPCODE_SEND:
        case MLX5_OPCODE_SEND_INVAL:
                wc->opcode    = IB_WC_SEND;
index acb79d3a4f1d3741d163f98e83a4f2e6a4a75d34..b0b09febafda6a275fb305c22c12fa685ecb8b93 100644 (file)
@@ -4053,6 +4053,7 @@ int mlx5_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
                                *bad_wr = wr;
                                goto out;
                        }
+                       /* fall through */
                case MLX5_IB_QPT_HW_GSI:
                        set_datagram_seg(seg, wr);
                        seg += sizeof(struct mlx5_wqe_datagram_seg);