[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFBinCBJVqM86VxPzSxafav9iOepS4sHuYWTD_1wY0ZYdjmzUw@mail.gmail.com>
Date: Sat, 5 Nov 2022 23:55:57 +0100
From: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
To: Rasmus Villemoes <linux@...musvillemoes.dk>
Cc: Andrew Lunn <andrew@...n.ch>,
"David S . Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: stmmac: dwmac-meson8b: fix meson8b_devm_clk_prepare_enable()
Rasmus replied to me off-list yesterday. His reply is important so I
am sharing it here.
On Fri, Nov 4, 2022 at 10:02 PM Martin Blumenstingl
<martin.blumenstingl@...glemail.com> wrote:
[...]
> If we want to propagate the error code returned by
> devm_add_action_or_reset() then we also need to do the clean up within
> meson8b_devm_clk_prepare_enable(), meaning we need to call
> clk_disable_unprepare() in case devm_add_action_or_reset() failed.
> Your change just propagates the error code without disabling and
> unpreparing the clock.
Rasmus replied to me:
"devm_add_action_or_reset precisely calls the reset callback for you
if the add action falls..."
I was not aware of this but it's actually true, which makes the patch
perfectly valid. Thanks for the heads up Rasmus!
So this patch gets my:
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
I suggest applying it to net-next (even though it carries a Fixes tag)
so the various kernel auto testing labs can try it out on as many
Amlogic SoCs as possible.
Best regards,
Martin
Powered by blists - more mailing lists