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: <vvthbvqhcvaau2bfvlg7yajpeybrvlvqdmbqzgygk6wyjcf7di@lfwuqmpk2u3z>
Date: Thu, 26 Sep 2024 07:57:08 +0200
From: Uwe Kleine-König <u.kleine-koenig@...libre.com>
To: Philipp Zabel <p.zabel@...gutronix.de>
Cc: Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>, 
	Masami Hiramatsu <mhiramat@...nel.org>, Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>, 
	Geert Uytterhoeven <geert+renesas@...der.be>, linux-kernel@...r.kernel.org, 
	linux-arm-kernel@...ts.infradead.org, kernel@...gutronix.de
Subject: Re: [PATCH v2 0/3] reset: Requesting pre-deasserted,
 auto-reasserting reset controls via devres

Hello Philipp,

On Wed, Sep 25, 2024 at 06:40:08PM +0200, Philipp Zabel wrote:
> There is a recurring pattern of drivers requesting a reset control and
> deasserting the reset during probe, followed by registering a reset
> assertion via devm_add_action_or_reset().
> 
> We can simplify this by providing devm_reset_control_get_*_deasserted()
> helpers that return an already deasserted reset control, similarly to
> devm_clk_get_enabled().
> 
> This doesn't remove a lot of boilerplate at each instance, but there are
> quite a few of them now.

I really like it, thanks for respinning!

Acked-by: Uwe Kleine-König <u.kleine-koenig@...libre.com>

Two small notes: I think __devm_reset_control_get() could be a bit
simplified if it used devm_add_action_or_reset() instead of
devres_alloc() + devres_add(). I also would have prefered an if block
(or a function pointer) in the release function instead of a ?:
construct to select the right release function like e.g.
__devm_clk_get() does it. But that's both subjective I think and
orthogonal to this patch set.

Best regards
Uwe

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ