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]
Message-ID: <CADRPPNT-ZGsn_04J8tLuyACqpdtSE0b8qg0dC7jPgTZcMhx26g@mail.gmail.com>
Date:   Thu, 21 Oct 2021 19:37:20 -0500
From:   Li Yang <leoyang.li@....com>
To:     Cai Huoqing <caihuoqing@...du.com>
Cc:     linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
        lkml <linux-kernel@...r.kernel.org>,
        "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" 
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 2/2] soc: fsl: rcpm: Make use of the helper function devm_platform_ioremap_resource()

On Wed, Sep 8, 2021 at 2:20 AM Cai Huoqing <caihuoqing@...du.com> wrote:
>
> Use the devm_platform_ioremap_resource() helper instead of
> calling platform_get_resource() and devm_ioremap_resource()
> separately
>
> Signed-off-by: Cai Huoqing <caihuoqing@...du.com>

Applied for next.  Thanks.

> ---
>  drivers/soc/fsl/rcpm.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/soc/fsl/rcpm.c b/drivers/soc/fsl/rcpm.c
> index 90d3f4060b0c..3d0cae30c769 100644
> --- a/drivers/soc/fsl/rcpm.c
> +++ b/drivers/soc/fsl/rcpm.c
> @@ -146,7 +146,6 @@ static const struct dev_pm_ops rcpm_pm_ops = {
>  static int rcpm_probe(struct platform_device *pdev)
>  {
>         struct device   *dev = &pdev->dev;
> -       struct resource *r;
>         struct rcpm     *rcpm;
>         int ret;
>
> @@ -154,11 +153,7 @@ static int rcpm_probe(struct platform_device *pdev)
>         if (!rcpm)
>                 return -ENOMEM;
>
> -       r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -       if (!r)
> -               return -ENODEV;
> -
> -       rcpm->ippdexpcr_base = devm_ioremap_resource(&pdev->dev, r);
> +       rcpm->ippdexpcr_base = devm_platform_ioremap_resource(pdev, 0);
>         if (IS_ERR(rcpm->ippdexpcr_base)) {
>                 ret =  PTR_ERR(rcpm->ippdexpcr_base);
>                 return ret;
> --
> 2.25.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ