Commit c592c423 authored by Roland Dreier's avatar Roland Dreier

RDMA/ocrdma: Remove write-only variables

Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent e9db2953
...@@ -2293,7 +2293,6 @@ int ocrdma_mbx_modify_qp(struct ocrdma_dev *dev, struct ocrdma_qp *qp, ...@@ -2293,7 +2293,6 @@ int ocrdma_mbx_modify_qp(struct ocrdma_dev *dev, struct ocrdma_qp *qp,
{ {
int status = -ENOMEM; int status = -ENOMEM;
struct ocrdma_modify_qp *cmd; struct ocrdma_modify_qp *cmd;
struct ocrdma_modify_qp_rsp *rsp;
cmd = ocrdma_init_emb_mqe(OCRDMA_CMD_MODIFY_QP, sizeof(*cmd)); cmd = ocrdma_init_emb_mqe(OCRDMA_CMD_MODIFY_QP, sizeof(*cmd));
if (!cmd) if (!cmd)
...@@ -2317,7 +2316,7 @@ int ocrdma_mbx_modify_qp(struct ocrdma_dev *dev, struct ocrdma_qp *qp, ...@@ -2317,7 +2316,7 @@ int ocrdma_mbx_modify_qp(struct ocrdma_dev *dev, struct ocrdma_qp *qp,
status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd);
if (status) if (status)
goto mbx_err; goto mbx_err;
rsp = (struct ocrdma_modify_qp_rsp *)cmd;
mbx_err: mbx_err:
kfree(cmd); kfree(cmd);
return status; return status;
...@@ -2327,7 +2326,6 @@ int ocrdma_mbx_destroy_qp(struct ocrdma_dev *dev, struct ocrdma_qp *qp) ...@@ -2327,7 +2326,6 @@ int ocrdma_mbx_destroy_qp(struct ocrdma_dev *dev, struct ocrdma_qp *qp)
{ {
int status = -ENOMEM; int status = -ENOMEM;
struct ocrdma_destroy_qp *cmd; struct ocrdma_destroy_qp *cmd;
struct ocrdma_destroy_qp_rsp *rsp;
struct pci_dev *pdev = dev->nic_info.pdev; struct pci_dev *pdev = dev->nic_info.pdev;
cmd = ocrdma_init_emb_mqe(OCRDMA_CMD_DELETE_QP, sizeof(*cmd)); 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,7 +2335,7 @@ int ocrdma_mbx_destroy_qp(struct ocrdma_dev *dev, struct ocrdma_qp *qp)
status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd); status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd);
if (status) if (status)
goto mbx_err; goto mbx_err;
rsp = (struct ocrdma_destroy_qp_rsp *)cmd;
mbx_err: mbx_err:
kfree(cmd); kfree(cmd);
if (qp->sq.va) if (qp->sq.va)
......
...@@ -625,12 +625,10 @@ struct ib_mr *ocrdma_reg_user_mr(struct ib_pd *ibpd, u64 start, u64 len, ...@@ -625,12 +625,10 @@ struct ib_mr *ocrdma_reg_user_mr(struct ib_pd *ibpd, u64 start, u64 len,
struct ocrdma_dev *dev; struct ocrdma_dev *dev;
struct ocrdma_mr *mr; struct ocrdma_mr *mr;
struct ocrdma_pd *pd; struct ocrdma_pd *pd;
struct pci_dev *pdev;
u32 num_pbes; u32 num_pbes;
pd = get_ocrdma_pd(ibpd); pd = get_ocrdma_pd(ibpd);
dev = pd->dev; dev = pd->dev;
pdev = dev->nic_info.pdev;
if (acc & IB_ACCESS_REMOTE_WRITE && !(acc & IB_ACCESS_LOCAL_WRITE)) if (acc & IB_ACCESS_REMOTE_WRITE && !(acc & IB_ACCESS_LOCAL_WRITE))
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
...@@ -1596,10 +1594,8 @@ int ocrdma_modify_srq(struct ib_srq *ibsrq, ...@@ -1596,10 +1594,8 @@ int ocrdma_modify_srq(struct ib_srq *ibsrq,
{ {
int status = 0; int status = 0;
struct ocrdma_srq *srq; struct ocrdma_srq *srq;
struct ocrdma_dev *dev;
srq = get_ocrdma_srq(ibsrq); srq = get_ocrdma_srq(ibsrq);
dev = srq->dev;
if (srq_attr_mask & IB_SRQ_MAX_WR) if (srq_attr_mask & IB_SRQ_MAX_WR)
status = -EINVAL; status = -EINVAL;
else else
...@@ -1611,10 +1607,8 @@ int ocrdma_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *srq_attr) ...@@ -1611,10 +1607,8 @@ int ocrdma_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *srq_attr)
{ {
int status; int status;
struct ocrdma_srq *srq; struct ocrdma_srq *srq;
struct ocrdma_dev *dev;
srq = get_ocrdma_srq(ibsrq); srq = get_ocrdma_srq(ibsrq);
dev = srq->dev;
status = ocrdma_mbx_query_srq(srq, srq_attr); status = ocrdma_mbx_query_srq(srq, srq_attr);
return status; return status;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment