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: <CAHp75Vd2SgjvCe+8buU98EawVDXGHk8hqWCLFVvVpshTFZSKHw@mail.gmail.com>
Date:	Mon, 9 Nov 2015 15:57:28 +0200
From:	Andy Shevchenko <andy.shevchenko@...il.com>
To:	Jon Hunter <jonathanh@...dia.com>
Cc:	Laxman Dewangan <ldewangan@...dia.com>,
	Vinod Koul <vinod.koul@...el.com>,
	Stephen Warren <swarren@...dotorg.org>,
	Thierry Reding <thierry.reding@...il.com>,
	Alexandre Courbot <gnurou@...il.com>,
	dmaengine <dmaengine@...r.kernel.org>,
	"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V2 1/6] dmaengine: tegra-apb: Correct runtime-pm usage

On Mon, Nov 9, 2015 at 3:23 PM, Jon Hunter <jonathanh@...dia.com> wrote:
> The tegra-apb DMA driver enables runtime-pm but never calls
> pm_runtime_get/put and hence the runtime-pm callbacks are never invoked.
> The driver manages the clocks by directly calling clk_prepare_enable()
> and clk_unprepare_disable().
>
> Fix this by replacing the clk_prepare_enable() and clk_disable_unprepare()
> with pm_runtime_get_sync() and pm_runtime_put(), respectively. Note that
> the consequence of this is that if runtime-pm is disabled, then the clocks
> will remain on the entire time the driver is loaded. However, if
> runtime-pm is disabled, then power is not most likely not a concern.

Nitpick

> @@ -1539,11 +1534,10 @@ static int tegra_dma_runtime_resume(struct device *dev)
>  static int tegra_dma_pm_suspend(struct device *dev)
>  {
>         struct tegra_dma *tdma = dev_get_drvdata(dev);
> -       int i;
> -       int ret;
> +       int i, ret;

>  static int tegra_dma_pm_resume(struct device *dev)
>  {
>         struct tegra_dma *tdma = dev_get_drvdata(dev);
> -       int i;
> -       int ret;
> +       int i, ret;

Do you really need that?

-- 
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ