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: <c5d318947728e9e5b66d11542023b79452705ca3.camel@pengutronix.de>
Date: Tue, 01 Oct 2024 17:50:59 +0200
From: Philipp Zabel <p.zabel@...gutronix.de>
To: Uwe Kleine-König <u.kleine-koenig@...libre.com>
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

Hi Uwe,

On Do, 2024-09-26 at 07:57 +0200, Uwe Kleine-König wrote:
> 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.

Thank you. Not sure about using devm_add_action_or_reset(), but I'll
look into using a single release function.

Applied to reset/next.

[1/3] reset: replace boolean parameters with flags parameter
      https://git.pengutronix.de/cgit/pza/linux/commit/?id=dad35f7d2fc1
[2/3] reset: Add devres helpers to request pre-deasserted reset controls
      https://git.pengutronix.de/cgit/pza/linux/commit/?id=dad35f7d2fc1
[3/3] reset: uniphier-glue: Use devm_reset_control_bulk_get_shared_deasserted()
      https://git.pengutronix.de/cgit/pza/linux/commit/?id=c0260e2b0ed8

regards
Philipp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ