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] [day] [month] [year] [list]
Date:   Wed, 1 Aug 2018 11:00:43 -0600
From:   Mathieu Poirier <mathieu.poirier@...aro.org>
To:     zhong jiang <zhongjiang@...wei.com>
Cc:     Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "Suzuki K. Poulose" <Suzuki.Poulose@....com>
Subject: Re: [PATCH] driver/hwtracing: use ERR_CAST instead of ERR_PTR

On Tue, 31 Jul 2018 at 09:40, zhong jiang <zhongjiang@...wei.com> wrote:
>
> Use ERR_CAT inlined function to replace the ERR_PTR(PTR_ERR). It
> make the code more concise.
>
> Signed-off-by: zhong jiang <zhongjiang@...wei.com>
> ---
>  drivers/hwtracing/coresight/coresight-tmc-etr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-tmc-etr.c b/drivers/hwtracing/coresight/coresight-tmc-etr.c
> index 2eda5de..1196364 100644
> --- a/drivers/hwtracing/coresight/coresight-tmc-etr.c
> +++ b/drivers/hwtracing/coresight/coresight-tmc-etr.c
> @@ -536,7 +536,7 @@ static void tmc_etr_sg_table_populate(struct etr_sg_table *etr_table)
>         sg_table = tmc_alloc_sg_table(dev, node, nr_tpages, nr_dpages, pages);
>         if (IS_ERR(sg_table)) {
>                 kfree(etr_table);
> -               return ERR_PTR(PTR_ERR(sg_table));
> +               return ERR_CAST(sg_table);

Applied - thanks.
Mathieu

>         }
>
>         etr_table->sg_table = sg_table;
> --
> 1.7.12.4
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ