Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1577105 > unrolled thread
| Started by | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| First post | 2017-02-08 22:40 +0100 |
| Last post | 2017-02-09 20:10 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 00/14] RDMA/cxgb: Fine-tuning for several function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2017-02-08 22:40 +0100
[PATCH 09/14] RDMA/cxgb4: Use common error handling code in recover_lost_dbs() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-02-08 23:00 +0100
Re: [PATCH 09/14] RDMA/cxgb4: Use common error handling code in recover_lost_dbs() Leon Romanovsky <leon@kernel.org> - 2017-02-09 20:10 +0100
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2017-02-08 22:40 +0100 |
| Subject | [PATCH 00/14] RDMA/cxgb: Fine-tuning for several function implementations |
| Message-ID | <t8HOF-5t6-3@gated-at.bofh.it> |
From: Markus Elfring <elfring@users.sourceforge.net> Date: Wed, 8 Feb 2017 22:00:10 +0100 Several update suggestions were taken into account from static source code analysis. Markus Elfring (14): Use kcalloc() in cxio_create_qp() Rename jump labels in cxio_create_qp() Use kcalloc() in two functions Use common error handling code in recover_queues() Return an error code only as a constant in ep_open() Return an error code only as a constant in stag_open() Adjust three checks for null pointers Adjust construction of two error messages in recover_lost_dbs() Use common error handling code in recover_lost_dbs() Use kmalloc_array() in c4iw_id_table_alloc() Use kcalloc() in create_qp() Delete an unnecessary variable initialisation in create_qp() Rename jump labels in c4iw_create_qp() Rename jump labels in rdma_init() drivers/infiniband/hw/cxgb3/cxio_hal.c | 20 ++++---- drivers/infiniband/hw/cxgb4/device.c | 83 +++++++++++++++------------------- drivers/infiniband/hw/cxgb4/id_table.c | 5 +- drivers/infiniband/hw/cxgb4/qp.c | 48 ++++++++++---------- 4 files changed, 75 insertions(+), 81 deletions(-) -- 2.11.1
[toc] | [next] | [standalone]
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2017-02-08 23:00 +0100 |
| Subject | [PATCH 09/14] RDMA/cxgb4: Use common error handling code in recover_lost_dbs() |
| Message-ID | <t8Iro-5Hm-31@gated-at.bofh.it> |
| In reply to | #1577105 |
From: Markus Elfring <elfring@users.sourceforge.net> Date: Wed, 8 Feb 2017 18:08:08 +0100 Add a jump target so that a bit of exception handling can be better reused from an in branch in this function. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- drivers/infiniband/hw/cxgb4/device.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c index 2931920d7c4c..86cf7026619f 100644 --- a/drivers/infiniband/hw/cxgb4/device.c +++ b/drivers/infiniband/hw/cxgb4/device.c @@ -1402,9 +1402,7 @@ static void recover_lost_dbs(struct uld_ctx *ctx, struct qp_list *qp_list) pci_name(ctx->lldi.pdev), ": Fatal error - DB overflow recovery failed - error syncing ", qp->wq.sq.qid); - spin_unlock(&qp->lock); - spin_unlock_irq(&qp->rhp->lock); - return; + goto unlock; } qp->wq.sq.wq_pidx_inc = 0; @@ -1418,6 +1416,7 @@ static void recover_lost_dbs(struct uld_ctx *ctx, struct qp_list *qp_list) pci_name(ctx->lldi.pdev), ": Fatal error - DB overflow recovery failed - error syncing ", qp->wq.rq.qid); +unlock: spin_unlock(&qp->lock); spin_unlock_irq(&qp->rhp->lock); return; -- 2.11.1
[toc] | [prev] | [next] | [standalone]
| From | Leon Romanovsky <leon@kernel.org> |
|---|---|
| Date | 2017-02-09 20:10 +0100 |
| Subject | Re: [PATCH 09/14] RDMA/cxgb4: Use common error handling code in recover_lost_dbs() |
| Message-ID | <t92gr-1CS-37@gated-at.bofh.it> |
| In reply to | #1577136 |
[Multipart message — attachments visible in raw view] — view raw
On Wed, Feb 08, 2017 at 10:19:41PM +0100, SF Markus Elfring wrote: > From: Markus Elfring <elfring@users.sourceforge.net> > Date: Wed, 8 Feb 2017 18:08:08 +0100 > > Add a jump target so that a bit of exception handling can be better reused > from an in branch in this function. > > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> > --- > drivers/infiniband/hw/cxgb4/device.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c > index 2931920d7c4c..86cf7026619f 100644 > --- a/drivers/infiniband/hw/cxgb4/device.c > +++ b/drivers/infiniband/hw/cxgb4/device.c > @@ -1402,9 +1402,7 @@ static void recover_lost_dbs(struct uld_ctx *ctx, struct qp_list *qp_list) > pci_name(ctx->lldi.pdev), > ": Fatal error - DB overflow recovery failed - error syncing ", > qp->wq.sq.qid); > - spin_unlock(&qp->lock); > - spin_unlock_irq(&qp->rhp->lock); > - return; > + goto unlock; > } > qp->wq.sq.wq_pidx_inc = 0; > > @@ -1418,6 +1416,7 @@ static void recover_lost_dbs(struct uld_ctx *ctx, struct qp_list *qp_list) > pci_name(ctx->lldi.pdev), > ": Fatal error - DB overflow recovery failed - error syncing ", > qp->wq.rq.qid); > +unlock: > spin_unlock(&qp->lock); > spin_unlock_irq(&qp->rhp->lock); > return; These patches are completely insane. Goto label in the middle of the loop, just to exit from it. > -- > 2.11.1 >
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web