Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1577121
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 02/14] RDMA/cxgb3: Rename jump labels in cxio_create_qp() |
| Date | 2017-02-08 22:50 +0100 |
| Message-ID | <t8IhH-5DS-5@gated-at.bofh.it> (permalink) |
| References | <t8HOF-5t6-3@gated-at.bofh.it> <t8HYl-5wK-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Feb 8, 2017 at 11:12 PM, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 8 Feb 2017 14:28:25 +0100
>
> Adjust jump labels according to the Linux coding style convention.
"jump label" might be confusing, "goto label" or "error path label"
sounds better.
What the benefit for working code?
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/infiniband/hw/cxgb3/cxio_hal.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/infiniband/hw/cxgb3/cxio_hal.c b/drivers/infiniband/hw/cxgb3/cxio_hal.c
> index aeb1dfa8bfe5..113f614b07d4 100644
> --- a/drivers/infiniband/hw/cxgb3/cxio_hal.c
> +++ b/drivers/infiniband/hw/cxgb3/cxio_hal.c
> @@ -283,21 +283,21 @@ int cxio_create_qp(struct cxio_rdev *rdev_p, u32 kernel_domain,
>
> wq->rq = kcalloc(depth, sizeof(*wq->rq), GFP_KERNEL);
> if (!wq->rq)
> - goto err1;
> + goto put_pid;
>
> wq->rq_addr = cxio_hal_rqtpool_alloc(rdev_p, rqsize);
> if (!wq->rq_addr)
> - goto err2;
> + goto free_rq;
>
> wq->sq = kcalloc(depth, sizeof(*wq->sq), GFP_KERNEL);
> if (!wq->sq)
> - goto err3;
> + goto free_pool;
>
> wq->queue = dma_alloc_coherent(&(rdev_p->rnic_info.pdev->dev),
> depth * sizeof(union t3_wr),
> &(wq->dma_addr), GFP_KERNEL);
> if (!wq->queue)
> - goto err4;
> + goto free_sq;
>
> memset(wq->queue, 0, depth * sizeof(union t3_wr));
> dma_unmap_addr_set(wq, mapping, wq->dma_addr);
> @@ -309,13 +309,13 @@ int cxio_create_qp(struct cxio_rdev *rdev_p, u32 kernel_domain,
> PDBG("%s qpid 0x%x doorbell 0x%p udb 0x%llx\n", __func__,
> wq->qpid, wq->doorbell, (unsigned long long) wq->udb);
> return 0;
> -err4:
> +free_sq:
> kfree(wq->sq);
> -err3:
> +free_pool:
> cxio_hal_rqtpool_free(rdev_p, wq->rq_addr, rqsize);
> -err2:
> +free_rq:
> kfree(wq->rq);
> -err1:
> +put_pid:
> put_qpid(rdev_p, wq->qpid, uctx);
> return -ENOMEM;
> }
> --
> 2.11.1
>
--
With Best Regards,
Andy Shevchenko
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 02/14] RDMA/cxgb3: Rename jump labels in cxio_create_qp() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-02-08 22:30 +0100 Re: [PATCH 02/14] RDMA/cxgb3: Rename jump labels in cxio_create_qp() Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-02-08 22:50 +0100
csiph-web