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: <CAMuHMdXx5gUez8JoWch4A9qVCfobWG1bO==UXTfvGHryP2y9dg@mail.gmail.com>
Date:   Thu, 11 May 2023 09:11:39 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Wolfram Sang <wsa+renesas@...g-engineering.com>
Cc:     linux-renesas-soc@...r.kernel.org,
        Marek Vasut <marek.vasut+renesas@...il.com>,
        Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
        Lorenzo Pieralisi <lpieralisi@...nel.org>,
        Krzysztof Wilczyński <kw@...ux.com>,
        Rob Herring <robh@...nel.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>, linux-pci@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] PCI: rcar-host: add support for optional regulators

Hi Wolfram,

On Wed, May 10, 2023 at 9:06 PM Wolfram Sang
<wsa+renesas@...g-engineering.com> wrote:
> The KingFisher board has regulators. They just need to be en-/disabled,
> so we can leave the handling to devm. Order variables in reverse-xmas
> while we are here.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
> ---
> Changes since v1:
>
> * use unsigned int for i
> * use reverse-xmas for variable declaration
> * really bail out now on error

Thanks for the update!

> --- a/drivers/pci/controller/pcie-rcar-host.c
> +++ b/drivers/pci/controller/pcie-rcar-host.c

> @@ -992,6 +999,15 @@ static int rcar_pcie_probe(struct platform_device *pdev)
>         pcie->dev = dev;
>         platform_set_drvdata(pdev, host);
>
> +       for (i = 0; i < ARRAY_SIZE(rcar_pcie_supplies); i++) {
> +               err = devm_regulator_get_enable_optional(dev, rcar_pcie_supplies[i]);
> +               if (err < 0 && err != -ENODEV) {
> +                       dev_err_probe(dev, err, "error enabling regulator %s\n",
> +                                     rcar_pcie_supplies[i]);
> +                       return err;

dev_err_probe() was designed for daisy-chaining, so please use

    return dev_err_probe(...);

instead.

> +               }
> +       }
> +
>         pm_runtime_enable(pcie->dev);
>         err = pm_runtime_get_sync(pcie->dev);
>         if (err < 0) {

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