Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1414205 > unrolled thread
| Started by | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| First post | 2016-06-05 22:50 +0200 |
| Last post | 2016-06-06 11:00 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] IB/core: remove dead code Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-06-05 22:50 +0200
Re: [PATCH] IB/core: remove dead code Leon Romanovsky <leon@kernel.org> - 2016-06-06 09:30 +0200
Re: [PATCH] IB/core: remove dead code Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-06-06 11:00 +0200
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2016-06-05 22:50 +0200 |
| Subject | [PATCH] IB/core: remove dead code |
| Message-ID | <rGN9D-385-13@gated-at.bofh.it> |
prot_sg_cnt has been assigned with the value of ret which we have
already checked to be non-zero so prot_sg_cnt can never be zero at this
point of the code and hence the else part can never execute.
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
---
drivers/infiniband/core/rw.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/infiniband/core/rw.c b/drivers/infiniband/core/rw.c
index 1eb9b12..644589b 100644
--- a/drivers/infiniband/core/rw.c
+++ b/drivers/infiniband/core/rw.c
@@ -398,8 +398,6 @@ int rdma_rw_ctx_signature_init(struct rdma_rw_ctx *ctx, struct ib_qp *qp,
else
prev_wr->next = &ctx->sig->prot.reg_wr.wr;
prev_wr = &ctx->sig->prot.reg_wr.wr;
- } else {
- ctx->sig->prot.mr = NULL;
}
ctx->sig->sig_mr = ib_mr_pool_get(qp, &qp->sig_mrs);
--
1.9.1
[toc] | [next] | [standalone]
| From | Leon Romanovsky <leon@kernel.org> |
|---|---|
| Date | 2016-06-06 09:30 +0200 |
| Message-ID | <rGX90-1Ly-23@gated-at.bofh.it> |
| In reply to | #1414205 |
[Multipart message — attachments visible in raw view] — view raw
On Sun, Jun 05, 2016 at 09:45:52PM +0100, Sudip Mukherjee wrote:
> prot_sg_cnt has been assigned with the value of ret which we have
> already checked to be non-zero so prot_sg_cnt can never be zero at this
> point of the code and hence the else part can never execute.
>
> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
> ---
> drivers/infiniband/core/rw.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/infiniband/core/rw.c b/drivers/infiniband/core/rw.c
> index 1eb9b12..644589b 100644
> --- a/drivers/infiniband/core/rw.c
> +++ b/drivers/infiniband/core/rw.c
> @@ -398,8 +398,6 @@ int rdma_rw_ctx_signature_init(struct rdma_rw_ctx *ctx, struct ib_qp *qp,
> else
> prev_wr->next = &ctx->sig->prot.reg_wr.wr;
> prev_wr = &ctx->sig->prot.reg_wr.wr;
> - } else {
> - ctx->sig->prot.mr = NULL;
> }
You need to remove the "if (prot_sg_cnt) {" line too. There is no need
in it after you removed "else" case.
Thanks
>
> ctx->sig->sig_mr = ib_mr_pool_get(qp, &qp->sig_mrs);
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[toc] | [prev] | [next] | [standalone]
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2016-06-06 11:00 +0200 |
| Message-ID | <rGYy6-2yM-31@gated-at.bofh.it> |
| In reply to | #1414699 |
On Mon, Jun 06, 2016 at 10:22:43AM +0300, Leon Romanovsky wrote:
> On Sun, Jun 05, 2016 at 09:45:52PM +0100, Sudip Mukherjee wrote:
> > prot_sg_cnt has been assigned with the value of ret which we have
> > already checked to be non-zero so prot_sg_cnt can never be zero at this
> > point of the code and hence the else part can never execute.
> >
> > Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
> > ---
> > drivers/infiniband/core/rw.c | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/drivers/infiniband/core/rw.c b/drivers/infiniband/core/rw.c
> > index 1eb9b12..644589b 100644
> > --- a/drivers/infiniband/core/rw.c
> > +++ b/drivers/infiniband/core/rw.c
> > @@ -398,8 +398,6 @@ int rdma_rw_ctx_signature_init(struct rdma_rw_ctx *ctx, struct ib_qp *qp,
> > else
> > prev_wr->next = &ctx->sig->prot.reg_wr.wr;
> > prev_wr = &ctx->sig->prot.reg_wr.wr;
> > - } else {
> > - ctx->sig->prot.mr = NULL;
> > }
>
> You need to remove the "if (prot_sg_cnt) {" line too. There is no need
> in it after you removed "else" case.
ohhh, ofcourse. How silly of me.. :(
will send v2 tonight.
regards
sudip
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web