lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfX_LyfcaSUiv=RdXJnK+aX_ouuLEz-W7u3pSbdkY49BA@mail.gmail.com>
Date:   Wed, 8 Feb 2017 23:35:06 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     SF Markus Elfring <elfring@...rs.sourceforge.net>
Cc:     linux-rdma@...r.kernel.org, Doug Ledford <dledford@...hat.com>,
        Hal Rosenstock <hal.rosenstock@...il.com>,
        Sean Hefty <sean.hefty@...el.com>,
        Steve Wise <swise@...lsio.com>,
        LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 02/14] RDMA/cxgb3: Rename jump labels in cxio_create_qp()

On Wed, Feb 8, 2017 at 11:12 PM, SF Markus Elfring
<elfring@...rs.sourceforge.net> wrote:
> From: Markus Elfring <elfring@...rs.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@...rs.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ