Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1577093 > unrolled thread
| Started by | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| First post | 2017-02-08 22:30 +0100 |
| Last post | 2017-02-09 10:10 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 12/14] RDMA/cxgb4: Delete an unnecessary variable initialisation in create_qp() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-02-08 22:30 +0100
Re: [PATCH 12/14] RDMA/cxgb4: Delete an unnecessary variable initialisation in create_qp() Leon Romanovsky <leon@kernel.org> - 2017-02-09 10:10 +0100
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2017-02-08 22:30 +0100 |
| Subject | [PATCH 12/14] RDMA/cxgb4: Delete an unnecessary variable initialisation in create_qp() |
| Message-ID | <t8HYn-5wK-43@gated-at.bofh.it> |
From: Markus Elfring <elfring@users.sourceforge.net> Date: Wed, 8 Feb 2017 21:07:07 +0100 The local variable "ret" will be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning in this function. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- drivers/infiniband/hw/cxgb4/qp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c index 373d66a511a8..ac63b1f70731 100644 --- a/drivers/infiniband/hw/cxgb4/qp.c +++ b/drivers/infiniband/hw/cxgb4/qp.c @@ -202,7 +202,7 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq, int wr_len; struct c4iw_wr_wait wr_wait; struct sk_buff *skb; - int ret = 0; + int ret; int eqsize; wq->sq.qid = c4iw_get_qpid(rdev, uctx); -- 2.11.1
[toc] | [next] | [standalone]
| From | Leon Romanovsky <leon@kernel.org> |
|---|---|
| Date | 2017-02-09 10:10 +0100 |
| Message-ID | <t8STL-4gx-15@gated-at.bofh.it> |
| In reply to | #1577093 |
[Multipart message — attachments visible in raw view] — view raw
On Wed, Feb 08, 2017 at 10:22:28PM +0100, SF Markus Elfring wrote: > From: Markus Elfring <elfring@users.sourceforge.net> > Date: Wed, 8 Feb 2017 21:07:07 +0100 > > The local variable "ret" will be set to an appropriate value a bit later. > Thus omit the explicit initialisation at the beginning in this function. > > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> > --- > drivers/infiniband/hw/cxgb4/qp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c > index 373d66a511a8..ac63b1f70731 100644 > --- a/drivers/infiniband/hw/cxgb4/qp.c > +++ b/drivers/infiniband/hw/cxgb4/qp.c > @@ -202,7 +202,7 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq, > int wr_len; > struct c4iw_wr_wait wr_wait; > struct sk_buff *skb; > - int ret = 0; > + int ret; The more clean approach will be to initialize this variable to -ENOMEM and remove rest "ret = -ENOMEM" from the function. > int eqsize; > > wq->sq.qid = c4iw_get_qpid(rdev, uctx); > -- > 2.11.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] | [standalone]
Back to top | Article view | linux.kernel
csiph-web