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: <202408221433165841f563@mail.local>
Date: Thu, 22 Aug 2024 16:33:16 +0200
From: Alexandre Belloni <alexandre.belloni@...tlin.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Richard GENOUD <richard.genoud@...tlin.com>,
	Lei Liu <liulei.rjpt@...o.com>,
	Paul Cercueil <paul@...pouillou.net>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jiri Slaby <jirislaby@...nel.org>,
	Thierry Reding <thierry.reding@...il.com>,
	Jonathan Hunter <jonathanh@...dia.com>,
	Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>,
	Masami Hiramatsu <mhiramat@...nel.org>,
	Nicolas Ferre <nicolas.ferre@...rochip.com>,
	Claudiu Beznea <claudiu.beznea@...on.dev>,
	Liviu Dudau <liviu.dudau@....com>,
	Sudeep Holla <sudeep.holla@....com>,
	Lorenzo Pieralisi <lpieralisi@...nel.org>,
	Andreas Färber <afaerber@...e.de>,
	Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
	Patrice Chotard <patrice.chotard@...s.st.com>,
	Maxime Coquelin <mcoquelin.stm32@...il.com>,
	Alexandre Torgue <alexandre.torgue@...s.st.com>,
	Andi Shyti <andi.shyti@...ux.intel.com>,
	Florian Fainelli <florian.fainelli@...adcom.com>,
	Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
	John Ogness <john.ogness@...utronix.de>,
	Thomas Gleixner <tglx@...utronix.de>,
	Jeff Johnson <quic_jjohnson@...cinc.com>,
	Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
	Valentin Caron <valentin.caron@...s.st.com>,
	Lino Sanfilippo <l.sanfilippo@...bus.com>,
	Erwan Le Ray <erwan.leray@...s.st.com>, linux-mips@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
	linux-tegra@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-actions@...ts.infradead.org,
	linux-stm32@...md-mailman.stormreply.com,
	opensource.kernel@...o.com
Subject: Re: [PATCH 4/8] tty: atmel_serial: Use devm_clk_get_enabled() helpers

On 22/08/2024 16:34:28+0300, Andy Shevchenko wrote:
> On Thu, Aug 22, 2024 at 03:28:40PM +0200, Richard GENOUD wrote:
> > Le 22/08/2024 à 05:39, Lei Liu 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 calls to clk_disable_unprepare().
> 
> ...
> 
> > >   	 * The peripheral clock can now safely be disabled till the port
> > >   	 * is used
> > >   	 */
> > > -	clk_disable_unprepare(atmel_port->clk);
> > > -
> > Why removing this ?
> > This is not an error path.
> 
> Good point, I wouldn't apply this patch as well as a few others in this series
> due to this reason.
> 
> Instead it might make sense to add a comment on top of devm_clk_get() to
> explain why _enabled() variant is *not* used.

Or maybe stop doing brainded conversions to new APIs.

> 
> -- 
> With Best Regards,
> Andy Shevchenko
> 
> 

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ