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: <ZeWR2VByrV1xWmYN@hovoldconsulting.com>
Date: Mon, 4 Mar 2024 10:18:17 +0100
From: Johan Hovold <johan@...nel.org>
To: Anand Moon <linux.amoon@...il.com>
Cc: Christophe JAILLET <christophe.jaillet@...adoo.fr>,
	Alan Stern <stern@...land.harvard.edu>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
	Alim Akhtar <alim.akhtar@...sung.com>, linux-usb@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 1/4] usb: ehci-exynos: Use devm_clk_get_enabled()
 helpers

On Sat, Mar 02, 2024 at 10:05:46PM +0530, Anand Moon wrote:
> On Sat, 2 Mar 2024 at 21:19, Christophe JAILLET
> <christophe.jaillet@...adoo.fr> wrote:
> > Le 01/03/2024 à 20:38, Anand Moon a écrit :

> > > The devm_clk_get_enabled() helpers:
> > >      - call devm_clk_get()
> > >      - call clk_prepare_enable() and register what is needed in order to
> > >       call clk_disable_unprepare() when needed, as a managed resource.
> > >
> > > This simplifies the code and avoids the calls to clk_disable_unprepare().
> > >
> > > While at it, use dev_err_probe consistently, and use its return value
> > > to return the error code.

> > > @@ -260,25 +248,17 @@ static int exynos_ehci_suspend(struct device *dev)
> > >
> > >       exynos_ehci_phy_disable(dev);
> > >
> > > -     clk_disable_unprepare(exynos_ehci->clk);

> > I don't think that removing clk_[en|dis]abble from the suspend and
> > resume function is correct.
> >
> > The goal is to stop some hardware when the system is suspended, in order
> > to save some power.
> Yes correct,
> >
> > Why did you removed it?

> devm_clk_get_enabled  function register callback for clk_prepare_enable
> and clk_disable_unprepare, so when the clock resource is not used it should get
> disabled.
> 
> [0] https://elixir.bootlin.com/linux/latest/source/drivers/clk/clk-devres.c#L75
> 
> I have also tested with rtc suspend & resume and did not find any issue.

You seem to be totally confused about how devres works, and arguing back
after Christophe points this out to you instead of going back and doing
the homework you should have done before posting these patches is really
not OK (e.g. as you're wasting other people's time).

And you clearly did not test these patches enough to confirm that you
didn't break the driver.

Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ