RDMA/bnxt_re: Remove set-but-not-used variables
authorBart Van Assche <bart.vanassche@wdc.com>
Wed, 11 Oct 2017 17:48:49 +0000 (10:48 -0700)
committerDoug Ledford <dledford@redhat.com>
Sun, 15 Oct 2017 00:47:05 +0000 (20:47 -0400)
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/bnxt_re/ib_verbs.c
drivers/infiniband/hw/bnxt_re/qplib_fp.c
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
drivers/infiniband/hw/bnxt_re/qplib_sp.c

index 0d89621d9fe8ed81b0d28c031d48ffcacb31fdfd..af65f8114379913d9f17d8a9202455dab56ec95b 100644 (file)
@@ -1643,7 +1643,7 @@ static int bnxt_re_build_qp1_send_v2(struct bnxt_re_qp *qp,
        u8 ip_version = 0;
        u16 vlan_id = 0xFFFF;
        void *buf;
-       int i, rc = 0, size;
+       int i, rc = 0;
 
        memset(&qp->qp1_hdr, 0, sizeof(qp->qp1_hdr));
 
@@ -1760,7 +1760,7 @@ static int bnxt_re_build_qp1_send_v2(struct bnxt_re_qp *qp,
        /* Pack the QP1 to the transmit buffer */
        buf = bnxt_qplib_get_qp1_sq_buf(&qp->qplib_qp, &sge);
        if (buf) {
-               size = ib_ud_header_pack(&qp->qp1_hdr, buf);
+               ib_ud_header_pack(&qp->qp1_hdr, buf);
                for (i = wqe->num_sge; i; i--) {
                        wqe->sg_list[i].addr = wqe->sg_list[i - 1].addr;
                        wqe->sg_list[i].lkey = wqe->sg_list[i - 1].lkey;
@@ -2216,7 +2216,7 @@ static int bnxt_re_post_recv_shadow_qp(struct bnxt_re_dev *rdev,
                                       struct ib_recv_wr *wr)
 {
        struct bnxt_qplib_swqe wqe;
-       int rc = 0, payload_sz = 0;
+       int rc = 0;
 
        memset(&wqe, 0, sizeof(wqe));
        while (wr) {
@@ -2231,8 +2231,7 @@ static int bnxt_re_post_recv_shadow_qp(struct bnxt_re_dev *rdev,
                        rc = -EINVAL;
                        break;
                }
-               payload_sz = bnxt_re_build_sgl(wr->sg_list, wqe.sg_list,
-                                              wr->num_sge);
+               bnxt_re_build_sgl(wr->sg_list, wqe.sg_list, wr->num_sge);
                wqe.wr_id = wr->wr_id;
                wqe.type = BNXT_QPLIB_SWQE_TYPE_RECV;
 
@@ -2569,7 +2568,7 @@ static void bnxt_re_process_req_wc(struct ib_wc *wc, struct bnxt_qplib_cqe *cqe)
 static int bnxt_re_check_packet_type(u16 raweth_qp1_flags,
                                     u16 raweth_qp1_flags2)
 {
-       bool is_udp = false, is_ipv6 = false, is_ipv4 = false;
+       bool is_ipv6 = false, is_ipv4 = false;
 
        /* raweth_qp1_flags Bit 9-6 indicates itype */
        if ((raweth_qp1_flags & CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_ROCE)
@@ -2580,7 +2579,6 @@ static int bnxt_re_check_packet_type(u16 raweth_qp1_flags,
            CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_IP_CS_CALC &&
            raweth_qp1_flags2 &
            CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_L4_CS_CALC) {
-               is_udp = true;
                /* raweth_qp1_flags2 Bit 8 indicates ip_type. 0-v4 1 - v6 */
                (raweth_qp1_flags2 &
                 CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_IP_TYPE) ?
index e82644cf1aeb3f50f2ad4834821855005c973971..a82044dacce0d4ffc5b73c328e9cb1f5e4eb9570 100644 (file)
@@ -160,11 +160,6 @@ void bnxt_qplib_add_flush_qp(struct bnxt_qplib_qp *qp)
 
 static void __bnxt_qplib_del_flush_qp(struct bnxt_qplib_qp *qp)
 {
-       struct bnxt_qplib_cq *scq, *rcq;
-
-       scq = qp->scq;
-       rcq = qp->rcq;
-
        if (qp->sq.flushed) {
                qp->sq.flushed = false;
                list_del(&qp->sq_flush);
index 2bdb1562bd2197e850f14bcc353d6ee12c3271c4..000e6a1940b9078659c096788fb377f18473ab45 100644 (file)
@@ -88,7 +88,6 @@ static int __send_message(struct bnxt_qplib_rcfw *rcfw, struct cmdq_base *req,
        unsigned long flags;
        u32 size, opcode;
        u16 cookie, cbit;
-       int pg, idx;
        u8 *preq;
 
        opcode = req->opcode;
@@ -149,9 +148,6 @@ static int __send_message(struct bnxt_qplib_rcfw *rcfw, struct cmdq_base *req,
        preq = (u8 *)req;
        size = req->cmd_size * BNXT_QPLIB_CMDQE_UNITS;
        do {
-               pg = 0;
-               idx = 0;
-
                /* Locate the next cmdq slot */
                sw_prod = HWQ_CMP(cmdq->prod, cmdq);
                cmdqe = &cmdq_ptr[get_cmdq_pg(sw_prod)][get_cmdq_idx(sw_prod)];
index e277e54a05eb6523caeb4c26c644abd18b794b67..9543ce51a28aeeeb21814b4c28082df07d79245e 100644 (file)
@@ -720,13 +720,12 @@ int bnxt_qplib_map_tc2cos(struct bnxt_qplib_res *res, u16 *cids)
        struct cmdq_map_tc_to_cos req;
        struct creq_map_tc_to_cos_resp resp;
        u16 cmd_flags = 0;
-       int rc = 0;
 
        RCFW_CMD_PREP(req, MAP_TC_TO_COS, cmd_flags);
        req.cos0 = cpu_to_le16(cids[0]);
        req.cos1 = cpu_to_le16(cids[1]);
 
-       rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req,
-                                         (void *)&resp, NULL, 0);
+       bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, (void *)&resp, NULL,
+                                    0);
        return 0;
 }