linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Hal Rosenstock
	<hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Steve Wise <swise-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
Cc: LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 13/14] RDMA/cxgb4: Rename jump labels in c4iw_create_qp()
Date: Wed, 8 Feb 2017 22:23:22 +0100	[thread overview]
Message-ID: <8f233488-a0fd-7f64-012d-d0281f02624a@users.sourceforge.net> (raw)
In-Reply-To: <0aff92fa-2891-333a-2e1e-ca309db2ec72-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>

From: Markus Elfring <elfring-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Date: Wed, 8 Feb 2017 21:12:26 +0100

Adjust jump labels according to the Linux coding style convention.

Signed-off-by: Markus Elfring <elfring-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
---
 drivers/infiniband/hw/cxgb4/qp.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c
index ac63b1f70731..c278b1d968b0 100644
--- a/drivers/infiniband/hw/cxgb4/qp.c
+++ b/drivers/infiniband/hw/cxgb4/qp.c
@@ -1817,7 +1817,7 @@ struct ib_qp *c4iw_create_qp(struct ib_pd *pd, struct ib_qp_init_attr *attrs,
 	ret = create_qp(&rhp->rdev, &qhp->wq, &schp->cq, &rchp->cq,
 			ucontext ? &ucontext->uctx : &rhp->rdev.uctx);
 	if (ret)
-		goto err1;
+		goto free_qhp;
 
 	attrs->cap.max_recv_wr = rqsize - 1;
 	attrs->cap.max_send_wr = sqsize - 1;
@@ -1848,35 +1848,35 @@ struct ib_qp *c4iw_create_qp(struct ib_pd *pd, struct ib_qp_init_attr *attrs,
 
 	ret = insert_handle(rhp, &rhp->qpidr, qhp, qhp->wq.sq.qid);
 	if (ret)
-		goto err2;
+		goto destroy_qp;
 
 	if (udata) {
 		sq_key_mm = kmalloc(sizeof(*sq_key_mm), GFP_KERNEL);
 		if (!sq_key_mm) {
 			ret = -ENOMEM;
-			goto err3;
+			goto remove_handle;
 		}
 		rq_key_mm = kmalloc(sizeof(*rq_key_mm), GFP_KERNEL);
 		if (!rq_key_mm) {
 			ret = -ENOMEM;
-			goto err4;
+			goto free_sq_key;
 		}
 		sq_db_key_mm = kmalloc(sizeof(*sq_db_key_mm), GFP_KERNEL);
 		if (!sq_db_key_mm) {
 			ret = -ENOMEM;
-			goto err5;
+			goto free_rq_key;
 		}
 		rq_db_key_mm = kmalloc(sizeof(*rq_db_key_mm), GFP_KERNEL);
 		if (!rq_db_key_mm) {
 			ret = -ENOMEM;
-			goto err6;
+			goto free_sq_db_key;
 		}
 		if (t4_sq_onchip(&qhp->wq.sq)) {
 			ma_sync_key_mm = kmalloc(sizeof(*ma_sync_key_mm),
 						 GFP_KERNEL);
 			if (!ma_sync_key_mm) {
 				ret = -ENOMEM;
-				goto err7;
+				goto free_rq_db_key;
 			}
 			uresp.flags = C4IW_QPF_ONCHIP;
 		} else
@@ -1906,7 +1906,7 @@ struct ib_qp *c4iw_create_qp(struct ib_pd *pd, struct ib_qp_init_attr *attrs,
 		spin_unlock(&ucontext->mmap_lock);
 		ret = ib_copy_to_udata(udata, &uresp, sizeof uresp);
 		if (ret)
-			goto err8;
+			goto free_ma_sync_key;
 		sq_key_mm->key = uresp.sq_key;
 		sq_key_mm->addr = qhp->wq.sq.phys_addr;
 		sq_key_mm->len = PAGE_ALIGN(qhp->wq.sq.memsize);
@@ -1944,22 +1944,22 @@ struct ib_qp *c4iw_create_qp(struct ib_pd *pd, struct ib_qp_init_attr *attrs,
 	     attrs->cap.max_send_wr, qhp->wq.rq.qid, qhp->wq.rq.size,
 	     qhp->wq.rq.memsize, attrs->cap.max_recv_wr);
 	return &qhp->ibqp;
-err8:
+free_ma_sync_key:
 	kfree(ma_sync_key_mm);
-err7:
+free_rq_db_key:
 	kfree(rq_db_key_mm);
-err6:
+free_sq_db_key:
 	kfree(sq_db_key_mm);
-err5:
+free_rq_key:
 	kfree(rq_key_mm);
-err4:
+free_sq_key:
 	kfree(sq_key_mm);
-err3:
+remove_handle:
 	remove_handle(rhp, &rhp->qpidr, qhp->wq.sq.qid);
-err2:
+destroy_qp:
 	destroy_qp(&rhp->rdev, &qhp->wq,
 		   ucontext ? &ucontext->uctx : &rhp->rdev.uctx);
-err1:
+free_qhp:
 	kfree(qhp);
 	return ERR_PTR(ret);
 }
-- 
2.11.1

--
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

  parent reply	other threads:[~2017-02-08 21:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-08 21:10 [PATCH 00/14] RDMA/cxgb: Fine-tuning for several function implementations SF Markus Elfring
2017-02-08 21:11 ` [PATCH 01/14] RDMA/cxgb3: Use kcalloc() in cxio_create_qp() SF Markus Elfring
2017-02-08 21:12 ` [PATCH 02/14] RDMA/cxgb3: Rename jump labels " SF Markus Elfring
2017-02-08 21:35   ` Andy Shevchenko
2017-02-08 21:14 ` [PATCH 04/14] RDMA/cxgb4: Use common error handling code in recover_queues() SF Markus Elfring
2017-02-09  9:30   ` Johannes Thumshirn
2017-02-08 21:16 ` [PATCH 06/14] RDMA/cxgb4: Return an error code only as a constant in stag_open() SF Markus Elfring
2017-02-08 21:17 ` [PATCH 07/14] RDMA/cxgb4: Adjust three checks for null pointers SF Markus Elfring
2017-02-08 21:19 ` [PATCH 09/14] RDMA/cxgb4: Use common error handling code in recover_lost_dbs() SF Markus Elfring
2017-02-09 18:57   ` Leon Romanovsky
2017-02-08 21:20 ` [PATCH 10/14] RDMA/cxgb4: Use kmalloc_array() in c4iw_id_table_alloc() SF Markus Elfring
2017-02-08 21:21 ` [PATCH 11/14] RDMA/cxgb4: Use kcalloc() in create_qp() SF Markus Elfring
     [not found] ` <0aff92fa-2891-333a-2e1e-ca309db2ec72-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
2017-02-08 21:13   ` [PATCH 03/14] RDMA/cxgb4: Use kcalloc() in two functions SF Markus Elfring
2017-02-08 21:15   ` [PATCH 05/14] RDMA/cxgb4: Return an error code only as a constant in ep_open() SF Markus Elfring
2017-02-08 21:18   ` [PATCH 08/14] RDMA/cxgb4: Adjust construction of two error messages in recover_lost_dbs() SF Markus Elfring
2017-02-08 21:22   ` [PATCH 12/14] RDMA/cxgb4: Delete an unnecessary variable initialisation in create_qp() SF Markus Elfring
     [not found]     ` <b319a50e-9e2a-61c0-5707-b4549b077d6a-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
2017-02-09  9:02       ` Leon Romanovsky
2017-02-08 21:23   ` SF Markus Elfring [this message]
2017-02-08 21:24   ` [PATCH 14/14] RDMA/cxgb4: Rename jump labels in rdma_init() SF Markus Elfring
2017-04-05 18:16 ` [PATCH 00/14] RDMA/cxgb: Fine-tuning for several function implementations Doug Ledford
     [not found]   ` <1491416174.2923.3.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-04-09  6:30     ` Leon Romanovsky

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=8f233488-a0fd-7f64-012d-d0281f02624a@users.sourceforge.net \
    --to=elfring-rn4veauk+akrv+lv9mx5uipxlwaovq5f@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=swise-ut6Up61K2wZBDgjK7y7TUQ@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;
as well as URLs for NNTP newsgroup(s).