* Re: [PATCH] mailbox: th1520: fix clock imbalance on probe failure
2025-10-17 5:54 ` [PATCH] mailbox: th1520: fix clock imbalance on probe failure Johan Hovold
@ 2025-10-21 18:36 ` Michal Wilczynski
2025-11-10 9:13 ` Johan Hovold
2025-11-10 19:11 ` Drew Fustini
2 siblings, 0 replies; 7+ messages in thread
From: Michal Wilczynski @ 2025-10-21 18:36 UTC (permalink / raw)
To: Johan Hovold, Drew Fustini, Guo Ren, Fu Wei, Jassi Brar
Cc: linux-riscv, linux-kernel
On 10/17/25 07:54, Johan Hovold wrote:
> The purpose of the devm_add_action_or_reset() helper is to call the
> action function in case adding an action ever fails so drop the clock
> disable from the error path to avoid disabling the clocks twice.
>
> Fixes: 5d4d263e1c6b ("mailbox: Introduce support for T-head TH1520 Mailbox driver")
> Cc: Michal Wilczynski <m.wilczynski@samsung.com>
> Signed-off-by: Johan Hovold <johan@kernel.org>
> ---
> drivers/mailbox/mailbox-th1520.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/mailbox/mailbox-th1520.c b/drivers/mailbox/mailbox-th1520.c
> index a6b2aa9ae952..626957c2e435 100644
> --- a/drivers/mailbox/mailbox-th1520.c
> +++ b/drivers/mailbox/mailbox-th1520.c
> @@ -435,10 +435,8 @@ static int th1520_mbox_probe(struct platform_device *pdev)
> }
>
> ret = devm_add_action_or_reset(dev, th1520_disable_clk, priv);
> - if (ret) {
> - clk_bulk_disable_unprepare(ARRAY_SIZE(priv->clocks), priv->clocks);
> + if (ret)
> return ret;
> - }
>
> /*
> * The address mappings in the device tree align precisely with those
Hi,
Thanks for your fix. I believe it is correct as devm_add_action_or_reset
will call th1520_disable_clk on failure, like you noticed.
Reviewed-by: Michal Wilczynski <m.wilczynski@samsung.com>
Best regards,
--
Michal Wilczynski <m.wilczynski@samsung.com>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] mailbox: th1520: fix clock imbalance on probe failure
2025-10-17 5:54 ` [PATCH] mailbox: th1520: fix clock imbalance on probe failure Johan Hovold
2025-10-21 18:36 ` Michal Wilczynski
@ 2025-11-10 9:13 ` Johan Hovold
2025-11-26 16:24 ` Johan Hovold
2025-11-10 19:11 ` Drew Fustini
2 siblings, 1 reply; 7+ messages in thread
From: Johan Hovold @ 2025-11-10 9:13 UTC (permalink / raw)
To: Drew Fustini, Guo Ren, Fu Wei, Jassi Brar
Cc: linux-riscv, linux-kernel, Michal Wilczynski
On Fri, Oct 17, 2025 at 07:54:14AM +0200, Johan Hovold wrote:
> The purpose of the devm_add_action_or_reset() helper is to call the
> action function in case adding an action ever fails so drop the clock
> disable from the error path to avoid disabling the clocks twice.
>
> Fixes: 5d4d263e1c6b ("mailbox: Introduce support for T-head TH1520 Mailbox driver")
> Cc: Michal Wilczynski <m.wilczynski@samsung.com>
> Signed-off-by: Johan Hovold <johan@kernel.org>
> ---
Can this one be picked up for 6.19?
Johan
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] mailbox: th1520: fix clock imbalance on probe failure
2025-11-10 9:13 ` Johan Hovold
@ 2025-11-26 16:24 ` Johan Hovold
2025-11-29 16:44 ` Drew Fustini
0 siblings, 1 reply; 7+ messages in thread
From: Johan Hovold @ 2025-11-26 16:24 UTC (permalink / raw)
To: Drew Fustini, Guo Ren, Fu Wei, Jassi Brar
Cc: linux-riscv, linux-kernel, Michal Wilczynski
On Mon, Nov 10, 2025 at 10:13:38AM +0100, Johan Hovold wrote:
> On Fri, Oct 17, 2025 at 07:54:14AM +0200, Johan Hovold wrote:
> > The purpose of the devm_add_action_or_reset() helper is to call the
> > action function in case adding an action ever fails so drop the clock
> > disable from the error path to avoid disabling the clocks twice.
> >
> > Fixes: 5d4d263e1c6b ("mailbox: Introduce support for T-head TH1520 Mailbox driver")
> > Cc: Michal Wilczynski <m.wilczynski@samsung.com>
> > Signed-off-by: Johan Hovold <johan@kernel.org>
> > ---
>
> Can this one be picked up for 6.19?
It's been another month so sending another reminder. Can this one be
picked up for 6.19?
Johan
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] mailbox: th1520: fix clock imbalance on probe failure
2025-11-26 16:24 ` Johan Hovold
@ 2025-11-29 16:44 ` Drew Fustini
2025-12-01 9:36 ` Johan Hovold
0 siblings, 1 reply; 7+ messages in thread
From: Drew Fustini @ 2025-11-29 16:44 UTC (permalink / raw)
To: Johan Hovold
Cc: Guo Ren, Fu Wei, Jassi Brar, linux-riscv, linux-kernel,
Michal Wilczynski
On Wed, Nov 26, 2025 at 05:24:05PM +0100, Johan Hovold wrote:
> On Mon, Nov 10, 2025 at 10:13:38AM +0100, Johan Hovold wrote:
> > On Fri, Oct 17, 2025 at 07:54:14AM +0200, Johan Hovold wrote:
> > > The purpose of the devm_add_action_or_reset() helper is to call the
> > > action function in case adding an action ever fails so drop the clock
> > > disable from the error path to avoid disabling the clocks twice.
> > >
> > > Fixes: 5d4d263e1c6b ("mailbox: Introduce support for T-head TH1520 Mailbox driver")
> > > Cc: Michal Wilczynski <m.wilczynski@samsung.com>
> > > Signed-off-by: Johan Hovold <johan@kernel.org>
> > > ---
> >
> > Can this one be picked up for 6.19?
>
> It's been another month so sending another reminder. Can this one be
> picked up for 6.19?
>
> Johan
It looks like this is now in the 6.18-rc7 PR from Jassi :)
https://lore.kernel.org/all/CABb+yY2GeWHWeASzemit8XvgvHg=Cse+46CqF3KJfsBXNPEBAw@mail.gmail.com/
-Drew
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] mailbox: th1520: fix clock imbalance on probe failure
2025-11-29 16:44 ` Drew Fustini
@ 2025-12-01 9:36 ` Johan Hovold
0 siblings, 0 replies; 7+ messages in thread
From: Johan Hovold @ 2025-12-01 9:36 UTC (permalink / raw)
To: Drew Fustini
Cc: Guo Ren, Fu Wei, Jassi Brar, linux-riscv, linux-kernel,
Michal Wilczynski
On Sat, Nov 29, 2025 at 08:44:51AM -0800, Drew Fustini wrote:
> On Wed, Nov 26, 2025 at 05:24:05PM +0100, Johan Hovold wrote:
> > On Mon, Nov 10, 2025 at 10:13:38AM +0100, Johan Hovold wrote:
> > > On Fri, Oct 17, 2025 at 07:54:14AM +0200, Johan Hovold wrote:
> > > > The purpose of the devm_add_action_or_reset() helper is to call the
> > > > action function in case adding an action ever fails so drop the clock
> > > > disable from the error path to avoid disabling the clocks twice.
> > > >
> > > > Fixes: 5d4d263e1c6b ("mailbox: Introduce support for T-head TH1520 Mailbox driver")
> > > > Cc: Michal Wilczynski <m.wilczynski@samsung.com>
> > > > Signed-off-by: Johan Hovold <johan@kernel.org>
> > > > ---
> > >
> > > Can this one be picked up for 6.19?
> >
> > It's been another month so sending another reminder. Can this one be
> > picked up for 6.19?
> It looks like this is now in the 6.18-rc7 PR from Jassi :)
>
> https://lore.kernel.org/all/CABb+yY2GeWHWeASzemit8XvgvHg=Cse+46CqF3KJfsBXNPEBAw@mail.gmail.com/
Yes, indeed, it made it into 6.18. Thanks!
Johan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mailbox: th1520: fix clock imbalance on probe failure
2025-10-17 5:54 ` [PATCH] mailbox: th1520: fix clock imbalance on probe failure Johan Hovold
2025-10-21 18:36 ` Michal Wilczynski
2025-11-10 9:13 ` Johan Hovold
@ 2025-11-10 19:11 ` Drew Fustini
2 siblings, 0 replies; 7+ messages in thread
From: Drew Fustini @ 2025-11-10 19:11 UTC (permalink / raw)
To: Jassi Brar
Cc: Johan Hovold, Guo Ren, Fu Wei, linux-riscv, linux-kernel,
Michal Wilczynski
On Fri, Oct 17, 2025 at 07:54:14AM +0200, Johan Hovold wrote:
> The purpose of the devm_add_action_or_reset() helper is to call the
> action function in case adding an action ever fails so drop the clock
> disable from the error path to avoid disabling the clocks twice.
>
> Fixes: 5d4d263e1c6b ("mailbox: Introduce support for T-head TH1520 Mailbox driver")
> Cc: Michal Wilczynski <m.wilczynski@samsung.com>
> Signed-off-by: Johan Hovold <johan@kernel.org>
> ---
> drivers/mailbox/mailbox-th1520.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/mailbox/mailbox-th1520.c b/drivers/mailbox/mailbox-th1520.c
> index a6b2aa9ae952..626957c2e435 100644
> --- a/drivers/mailbox/mailbox-th1520.c
> +++ b/drivers/mailbox/mailbox-th1520.c
> @@ -435,10 +435,8 @@ static int th1520_mbox_probe(struct platform_device *pdev)
> }
>
> ret = devm_add_action_or_reset(dev, th1520_disable_clk, priv);
> - if (ret) {
> - clk_bulk_disable_unprepare(ARRAY_SIZE(priv->clocks), priv->clocks);
> + if (ret)
> return ret;
> - }
>
> /*
> * The address mappings in the device tree align precisely with those
> --
> 2.49.1
>
Acked-by: Drew Fustini <fustini@kernel.org>
Jassi - are you able to take this through your mailbox tree?
Thanks,
Drew
^ permalink raw reply [flat|nested] 7+ messages in thread