diff options
author | Roland Dreier <roland@purestorage.com> | 2012-04-17 04:18:28 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2012-05-08 14:17:48 -0400 |
commit | c592c42331f685b73f19ee54cfebfac0084f6e93 (patch) | |
tree | 621d9b1b6412ea79536d903686e376abaa665953 /drivers/infiniband | |
parent | e9db29534d2bc7c5e24f0fdd4beff9001517d785 (diff) |
RDMA/ocrdma: Remove write-only variables
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 6 | ||||
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 6 |
2 files changed, 2 insertions, 10 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c index 5af30f131de4..9b204b1ba336 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c | |||
@@ -2293,7 +2293,6 @@ int ocrdma_mbx_modify_qp(struct ocrdma_dev *dev, struct ocrdma_qp *qp, | |||
2293 | { | 2293 | { |
2294 | int status = -ENOMEM; | 2294 | int status = -ENOMEM; |
2295 | struct ocrdma_modify_qp *cmd; | 2295 | struct ocrdma_modify_qp *cmd; |
2296 | struct ocrdma_modify_qp_rsp *rsp; | ||
2297 | 2296 | ||
2298 | cmd = ocrdma_init_emb_mqe(OCRDMA_CMD_MODIFY_QP, sizeof(*cmd)); | 2297 | cmd = ocrdma_init_emb_mqe(OCRDMA_CMD_MODIFY_QP, sizeof(*cmd)); |
2299 | if (!cmd) | 2298 | if (!cmd) |
@@ -2317,7 +2316,7 @@ int ocrdma_mbx_modify_qp(struct ocrdma_dev *dev, struct ocrdma_qp *qp, | |||
2317 | status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); | 2316 | status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); |
2318 | if (status) | 2317 | if (status) |
2319 | goto mbx_err; | 2318 | goto mbx_err; |
2320 | rsp = (struct ocrdma_modify_qp_rsp *)cmd; | 2319 | |
2321 | mbx_err: | 2320 | mbx_err: |
2322 | kfree(cmd); | 2321 | kfree(cmd); |
2323 | return status; | 2322 | return status; |
@@ -2327,7 +2326,6 @@ int ocrdma_mbx_destroy_qp(struct ocrdma_dev *dev, struct ocrdma_qp *qp) | |||
2327 | { | 2326 | { |
2328 | int status = -ENOMEM; | 2327 | int status = -ENOMEM; |
2329 | struct ocrdma_destroy_qp *cmd; | 2328 | struct ocrdma_destroy_qp *cmd; |
2330 | struct ocrdma_destroy_qp_rsp *rsp; | ||
2331 | struct pci_dev *pdev = dev->nic_info.pdev; | 2329 | struct pci_dev *pdev = dev->nic_info.pdev; |
2332 | 2330 | ||
2333 | cmd = ocrdma_init_emb_mqe(OCRDMA_CMD_DELETE_QP, sizeof(*cmd)); | 2331 | cmd = ocrdma_init_emb_mqe(OCRDMA_CMD_DELETE_QP, sizeof(*cmd)); |
@@ -2337,7 +2335,7 @@ int ocrdma_mbx_destroy_qp(struct ocrdma_dev *dev, struct ocrdma_qp *qp) | |||
2337 | status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); | 2335 | status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); |
2338 | if (status) | 2336 | if (status) |
2339 | goto mbx_err; | 2337 | goto mbx_err; |
2340 | rsp = (struct ocrdma_destroy_qp_rsp *)cmd; | 2338 | |
2341 | mbx_err: | 2339 | mbx_err: |
2342 | kfree(cmd); | 2340 | kfree(cmd); |
2343 | if (qp->sq.va) | 2341 | if (qp->sq.va) |
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c index e955f1f0848d..eb55c80fa7d3 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | |||
@@ -625,12 +625,10 @@ struct ib_mr *ocrdma_reg_user_mr(struct ib_pd *ibpd, u64 start, u64 len, | |||
625 | struct ocrdma_dev *dev; | 625 | struct ocrdma_dev *dev; |
626 | struct ocrdma_mr *mr; | 626 | struct ocrdma_mr *mr; |
627 | struct ocrdma_pd *pd; | 627 | struct ocrdma_pd *pd; |
628 | struct pci_dev *pdev; | ||
629 | u32 num_pbes; | 628 | u32 num_pbes; |
630 | 629 | ||
631 | pd = get_ocrdma_pd(ibpd); | 630 | pd = get_ocrdma_pd(ibpd); |
632 | dev = pd->dev; | 631 | dev = pd->dev; |
633 | pdev = dev->nic_info.pdev; | ||
634 | 632 | ||
635 | if (acc & IB_ACCESS_REMOTE_WRITE && !(acc & IB_ACCESS_LOCAL_WRITE)) | 633 | if (acc & IB_ACCESS_REMOTE_WRITE && !(acc & IB_ACCESS_LOCAL_WRITE)) |
636 | return ERR_PTR(-EINVAL); | 634 | return ERR_PTR(-EINVAL); |
@@ -1596,10 +1594,8 @@ int ocrdma_modify_srq(struct ib_srq *ibsrq, | |||
1596 | { | 1594 | { |
1597 | int status = 0; | 1595 | int status = 0; |
1598 | struct ocrdma_srq *srq; | 1596 | struct ocrdma_srq *srq; |
1599 | struct ocrdma_dev *dev; | ||
1600 | 1597 | ||
1601 | srq = get_ocrdma_srq(ibsrq); | 1598 | srq = get_ocrdma_srq(ibsrq); |
1602 | dev = srq->dev; | ||
1603 | if (srq_attr_mask & IB_SRQ_MAX_WR) | 1599 | if (srq_attr_mask & IB_SRQ_MAX_WR) |
1604 | status = -EINVAL; | 1600 | status = -EINVAL; |
1605 | else | 1601 | else |
@@ -1611,10 +1607,8 @@ int ocrdma_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *srq_attr) | |||
1611 | { | 1607 | { |
1612 | int status; | 1608 | int status; |
1613 | struct ocrdma_srq *srq; | 1609 | struct ocrdma_srq *srq; |
1614 | struct ocrdma_dev *dev; | ||
1615 | 1610 | ||
1616 | srq = get_ocrdma_srq(ibsrq); | 1611 | srq = get_ocrdma_srq(ibsrq); |
1617 | dev = srq->dev; | ||
1618 | status = ocrdma_mbx_query_srq(srq, srq_attr); | 1612 | status = ocrdma_mbx_query_srq(srq, srq_attr); |
1619 | return status; | 1613 | return status; |
1620 | } | 1614 | } |