IB/mlx4: Suppress gcc 7 fall-through complaints
authorBart Van Assche <bart.vanassche@wdc.com>
Wed, 11 Oct 2017 17:49:06 +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/mlx4/cq.c
drivers/infiniband/hw/mlx4/mcg.c

index cab796341697953eb6a3599c70f24f05ac768a5b..6d5f405912dd28c2bb25434614c06c3a52cb19dd 100644 (file)
@@ -768,11 +768,13 @@ repoll:
                switch (cqe->owner_sr_opcode & MLX4_CQE_OPCODE_MASK) {
                case MLX4_OPCODE_RDMA_WRITE_IMM:
                        wc->wc_flags |= IB_WC_WITH_IMM;
+                       /* fall through */
                case MLX4_OPCODE_RDMA_WRITE:
                        wc->opcode    = IB_WC_RDMA_WRITE;
                        break;
                case MLX4_OPCODE_SEND_IMM:
                        wc->wc_flags |= IB_WC_WITH_IMM;
+                       /* fall through */
                case MLX4_OPCODE_SEND:
                case MLX4_OPCODE_SEND_INVAL:
                        wc->opcode    = IB_WC_SEND;
index 70eb9f917303571e575606032afeee8b22c84c45..81ffc007e0a1d9ba122288eb25d62912798e6360 100644 (file)
@@ -944,6 +944,7 @@ int mlx4_ib_mcg_multiplex_handler(struct ib_device *ibdev, int port,
        switch (sa_mad->mad_hdr.method) {
        case IB_MGMT_METHOD_SET:
                may_create = 1;
+               /* fall through */
        case IB_SA_METHOD_DELETE:
                req = kzalloc(sizeof *req, GFP_KERNEL);
                if (!req)