From: Roland Dreier <roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Parav Pandit
<parav.pandit-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 4/4] RDMA/ocrdma: Remove write-only variables
Date: Tue, 24 Apr 2012 16:49:45 -0700 [thread overview]
Message-ID: <1335311385-11381-5-git-send-email-roland@kernel.org> (raw)
In-Reply-To: <1335311385-11381-1-git-send-email-roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
From: Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
Signed-off-by: Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
---
drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 6 ++----
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 5af30f1..9b204b1 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,
{
int status = -ENOMEM;
struct ocrdma_modify_qp *cmd;
- struct ocrdma_modify_qp_rsp *rsp;
cmd = ocrdma_init_emb_mqe(OCRDMA_CMD_MODIFY_QP, sizeof(*cmd));
if (!cmd)
@@ -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);
if (status)
goto mbx_err;
- rsp = (struct ocrdma_modify_qp_rsp *)cmd;
+
mbx_err:
kfree(cmd);
return status;
@@ -2327,7 +2326,6 @@ int ocrdma_mbx_destroy_qp(struct ocrdma_dev *dev, struct ocrdma_qp *qp)
{
int status = -ENOMEM;
struct ocrdma_destroy_qp *cmd;
- struct ocrdma_destroy_qp_rsp *rsp;
struct pci_dev *pdev = dev->nic_info.pdev;
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)
status = ocrdma_mbx_cmd(dev, (struct ocrdma_mqe *)cmd);
if (status)
goto mbx_err;
- rsp = (struct ocrdma_destroy_qp_rsp *)cmd;
+
mbx_err:
kfree(cmd);
if (qp->sq.va)
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
index e955f1f..eb55c80 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,
struct ocrdma_dev *dev;
struct ocrdma_mr *mr;
struct ocrdma_pd *pd;
- struct pci_dev *pdev;
u32 num_pbes;
pd = get_ocrdma_pd(ibpd);
dev = pd->dev;
- pdev = dev->nic_info.pdev;
if (acc & IB_ACCESS_REMOTE_WRITE && !(acc & IB_ACCESS_LOCAL_WRITE))
return ERR_PTR(-EINVAL);
@@ -1596,10 +1594,8 @@ int ocrdma_modify_srq(struct ib_srq *ibsrq,
{
int status = 0;
struct ocrdma_srq *srq;
- struct ocrdma_dev *dev;
srq = get_ocrdma_srq(ibsrq);
- dev = srq->dev;
if (srq_attr_mask & IB_SRQ_MAX_WR)
status = -EINVAL;
else
@@ -1611,10 +1607,8 @@ int ocrdma_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *srq_attr)
{
int status;
struct ocrdma_srq *srq;
- struct ocrdma_dev *dev;
srq = get_ocrdma_srq(ibsrq);
- dev = srq->dev;
status = ocrdma_mbx_query_srq(srq, srq_attr);
return status;
}
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2012-04-24 23:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-24 23:49 ocrdma merged to my next branch Roland Dreier
[not found] ` <1335311385-11381-1-git-send-email-roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-04-24 23:49 ` [PATCH 1/4] RDMA/ocrdma: Fix warnings about uninitialized variables Roland Dreier
2012-04-24 23:49 ` [PATCH 2/4] RDMA/ocrdma: Make needlessly global functions/structs static Roland Dreier
2012-04-24 23:49 ` [PATCH 3/4] RDMA/ocrdma: Set event's device member in ocrdma_dispatch_ibevent() Roland Dreier
2012-04-24 23:49 ` Roland Dreier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1335311385-11381-5-git-send-email-roland@kernel.org \
--to=roland-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=parav.pandit-laKkSmNT4hbQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox