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: <CAMuHMdWz=gyH_c1bq435Wtu53yG6MJgNodRa7_0T2q6BLppmSw@mail.gmail.com>
Date:   Thu, 6 Jul 2023 15:05:50 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Yangtao Li <frank.li@...o.com>
Cc:     Sergey Shtylyov <s.shtylyov@....ru>,
        Damien Le Moal <dlemoal@...nel.org>,
        linux-ide@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/8] ata: sata_rcar: Convert to devm_platform_ioremap_resource()

Hi Yangtao,

On Thu, Jul 6, 2023 at 2:44 PM Yangtao Li <frank.li@...o.com> wrote:
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <frank.li@...o.com>

Thanks for your patch!

> --- a/drivers/ata/sata_rcar.c
> +++ b/drivers/ata/sata_rcar.c
> @@ -861,15 +861,11 @@ static int sata_rcar_probe(struct platform_device *pdev)
>         struct device *dev = &pdev->dev;
>         struct ata_host *host;
>         struct sata_rcar_priv *priv;
> -       struct resource *mem;
> -       int irq;
> -       int ret = 0;
> +       int irq, ret;
>
>         irq = platform_get_irq(pdev, 0);
>         if (irq < 0)
>                 return irq;
> -       if (!irq)
> -               return -EINVAL;

Why this change?
It is not documented in the patch description.

>
>         priv = devm_kzalloc(dev, sizeof(struct sata_rcar_priv), GFP_KERNEL);
>         if (!priv)
> @@ -890,8 +886,7 @@ static int sata_rcar_probe(struct platform_device *pdev)
>
>         host->private_data = priv;
>
> -       mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -       priv->base = devm_ioremap_resource(dev, mem);
> +       priv->base = devm_platform_ioremap_resource(pdev, 0);
>         if (IS_ERR(priv->base)) {
>                 ret = PTR_ERR(priv->base);
>                 goto err_pm_put;

The rest LGTM.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ