RDMA/rxe: Suppress gcc 7 fall-through complaints
authorBart Van Assche <bart.vanassche@wdc.com>
Wed, 11 Oct 2017 17:49:24 +0000 (10:49 -0700)
committerDoug Ledford <dledford@redhat.com>
Sun, 15 Oct 2017 00:47:07 +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>
Cc: Moni Shoua <monis@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rxe/rxe_comp.c
drivers/infiniband/sw/rxe/rxe_task.c
drivers/infiniband/sw/rxe/rxe_verbs.c

index 9eb12c2e3c74cf69499124e21fcb1b4a8be4a40f..ff64875e3d1540da062cd55d54036e9e6a511d6c 100644 (file)
@@ -270,8 +270,8 @@ static inline enum comp_state check_ack(struct rxe_qp *qp,
                if ((syn & AETH_TYPE_MASK) != AETH_ACK)
                        return COMPST_ERROR;
 
-               /* Fall through (IB_OPCODE_RC_RDMA_READ_RESPONSE_MIDDLE
-                * doesn't have an AETH)
+               /* fall through */
+               /* (IB_OPCODE_RC_RDMA_READ_RESPONSE_MIDDLE doesn't have an AETH)
                 */
        case IB_OPCODE_RC_RDMA_READ_RESPONSE_MIDDLE:
                if (wqe->wr.opcode != IB_WR_RDMA_READ &&
index ea3810b2927367885ef42e4487729e4bb37e43d4..08f05ac5f5d526f94d48f5b68ae9512463c4bd15 100644 (file)
@@ -71,7 +71,7 @@ void rxe_do_task(unsigned long data)
 
        case TASK_STATE_BUSY:
                task->state = TASK_STATE_ARMED;
-               /* fall through to */
+               /* fall through */
        case TASK_STATE_ARMED:
                spin_unlock_irqrestore(&task->state_lock, flags);
                return;
index 0b362f49a10a96eb24389b2336c6f4ab721b3e34..ff77f4f669708c8d2a8b750582d596f755577e5d 100644 (file)
@@ -644,6 +644,7 @@ static void init_send_wr(struct rxe_qp *qp, struct rxe_send_wr *wr,
                switch (wr->opcode) {
                case IB_WR_RDMA_WRITE_WITH_IMM:
                        wr->ex.imm_data = ibwr->ex.imm_data;
+                       /* fall through */
                case IB_WR_RDMA_READ:
                case IB_WR_RDMA_WRITE:
                        wr->wr.rdma.remote_addr = rdma_wr(ibwr)->remote_addr;