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: <CAPv3WKcF9ZihAtzO3UekaP76UFhPvbHTtg0S+Eu=UbKtb4+ocw@mail.gmail.com>
Date:   Wed, 25 Nov 2020 12:50:43 +0100
From:   Marcin Wojtas <mw@...ihalf.com>
To:     Ulf Hansson <ulf.hansson@...aro.org>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
        Ziji Hu <huziji@...vell.com>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Grzegorz Jaszczyk <jaz@...ihalf.com>,
        Tomasz Nowicki <tn@...ihalf.com>,
        Ard Biesheuvel <ard.biesheuvel@....com>,
        Kostya Porotchkin <kostap@...vell.com>
Subject: Re: [PATCH v2 3/4] mmc: sdhci-xenon: use clk only with DT

Hi Ulf


wt., 24 lis 2020 o 12:31 Ulf Hansson <ulf.hansson@...aro.org> napisaƂ(a):
>
> On Fri, 20 Nov 2020 at 04:27, Marcin Wojtas <mw@...ihalf.com> wrote:
> >
> > As a preparation for supporting ACPI, modify the driver
> > to use the clk framework only when booting with DT -
> > otherwise rely on the configuration done by firmware.
> > For that purpose introduce also a custom SDHCI get_max_clock
> > callback.
> >
> > Signed-off-by: Marcin Wojtas <mw@...ihalf.com>
>
> [...]
>
> > @@ -561,9 +574,11 @@ static int xenon_probe(struct platform_device *pdev)
> >         pm_runtime_put_noidle(&pdev->dev);
> >         xenon_sdhc_unprepare(host);
> >  err_clk_axi:
> > -       clk_disable_unprepare(priv->axi_clk);
> > +       if (dev->of_node)
> > +               clk_disable_unprepare(priv->axi_clk);
> >  err_clk:
> > -       clk_disable_unprepare(pltfm_host->clk);
> > +       if (dev->of_node)
> > +               clk_disable_unprepare(pltfm_host->clk);
>
> There's no need to check the dev->of_node, I believe. The
> clk_disable_unprepare() is capable of managing a NULL pointer as
> in-parameter.
>

Indeed, clk_disable_unprepare() can handle the NULL pointers. I will
wait a couple of days for other comments/remarks and will update this
patch in v3.

Best regards,
Marcin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ