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:   Thu, 12 Nov 2020 15:10:59 +0100
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Bean Huo <huobean@...il.com>
Cc:     alim.akhtar@...sung.com, avri.altman@....com,
        asutoshd@...eaurora.org,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        stanley.chu@...iatek.com,
        Bean Huo 霍斌斌 (beanhuo) 
        <beanhuo@...ron.com>, Bart Van Assche <bvanassche@....org>,
        "Winkler, Tomas" <tomas.winkler@...el.com>, cang@...eaurora.org,
        scsi <linux-scsi@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] scsi: ufs-exynos: use devm_platform_ioremap_resource_byname()

Hi Bean,

On Thu, Nov 12, 2020 at 3:06 PM Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
> On Wed, Sep 16, 2020 at 10:43 AM Bean Huo <huobean@...il.com> wrote:
> > From: Bean Huo <beanhuo@...ron.com>
> >
> > Use devm_platform_ioremap_resource_byname() to simplify the code.
> >
> > Signed-off-by: Bean Huo <beanhuo@...ron.com>
>
> Thanks for your patch, which is now commit 2dd39fad92a1f25f ("scsi: ufs:
> ufs-exynos: Use devm_platform_ioremap_resource_byname()") in v5.10-rc1.
>
> > --- a/drivers/scsi/ufs/ufs-exynos.c
> > +++ b/drivers/scsi/ufs/ufs-exynos.c
> > @@ -940,7 +940,6 @@ static int exynos_ufs_init(struct ufs_hba *hba)
> >         struct device *dev = hba->dev;
> >         struct platform_device *pdev = to_platform_device(dev);
> >         struct exynos_ufs *ufs;
> > -       struct resource *res;
> >         int ret;
> >
> >         ufs = devm_kzalloc(dev, sizeof(*ufs), GFP_KERNEL);
> > @@ -948,24 +947,21 @@ static int exynos_ufs_init(struct ufs_hba *hba)
> >                 return -ENOMEM;
> >
> >         /* exynos-specific hci */
> > -       res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "vs_hci");
> > -       ufs->reg_hci = devm_ioremap_resource(dev, res);
> > +       ufs->reg_hci = devm_platform_ioremap_resource_byname(pdev, "vs_hci");
>
> Are you sure this is equivalent?
> Before, devm_ioremap_resource() was called on "dev" (hba->dev),
> after it is called on "&pdev->dev" .

Yes it is, due to:

    struct platform_device *pdev = to_platform_device(dev);

Sorry for the noise.

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