• Gustavo A. R. Silva's avatar
    RDMA/siw: Mark expected switch fall-throughs · cea743f2
    Gustavo A. R. Silva authored
    In preparation to enabling -Wimplicit-fallthrough, mark switch cases where
    we are expecting to fall through.
    
    This patch fixes the following warnings:
    
    drivers/infiniband/sw/siw/siw_qp_rx.c: In function ‘siw_rdmap_complete’:
    drivers/infiniband/sw/siw/siw_qp_rx.c:1214:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
       wqe->rqe.flags |= SIW_WQE_SOLICITED;
       ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
    drivers/infiniband/sw/siw/siw_qp_rx.c:1215:2: note: here
      case RDMAP_SEND:
      ^~~~
    
    drivers/infiniband/sw/siw/siw_qp_tx.c: In function ‘siw_qp_sq_process’:
    drivers/infiniband/sw/siw/siw_qp_tx.c:1044:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
        siw_wqe_put_mem(wqe, tx_type);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/infiniband/sw/siw/siw_qp_tx.c:1045:3: note: here
       case SIW_OP_INVAL_STAG:
       ^~~~
    drivers/infiniband/sw/siw/siw_qp_tx.c:1128:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
        siw_wqe_put_mem(wqe, tx_type);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/infiniband/sw/siw/siw_qp_tx.c:1129:3: note: here
       case SIW_OP_INVAL_STAG:
       ^~~~
    
    Warning level 3 was used: -Wimplicit-fallthrough=3
    
    This patch is part of the ongoing efforts to enable
    -Wimplicit-fallthrough.
    Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
    Reviewed-by: default avatarBernard Metzler <bmt@zurich.ibm.com>
    Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
    cea743f2
siw_qp_tx.c 30.5 KB