From: sashiko-bot@kernel.org
To: "Rosen Penev" <rosenp@gmail.com>
Cc: Frank.Li@kernel.org, imx@lists.linux.dev
Subject: Re: [PATCH 1/3] serial: mxs-auart: rework clock handling in mxs_get_clks and probe
Date: Wed, 03 Jun 2026 03:08:42 +0000 [thread overview]
Message-ID: <20260603030842.929931F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260603025857.287148-2-rosenp@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Unconditional execution of `clk_prepare_enable(s->clk)` in `probe()` causes a clock enable leak and power regression for non-ASM9260 devices. Note: I found the fix later in the series in patch "serial: mxs-auart: fix IRQ registration ordering and manage console clock".
--
commit 6dcd08fa908a611decc8b93570ddfa7ca65af26c
Author: Rosen Penev <rosenp@gmail.com>
serial: mxs-auart: rework clock handling in mxs_get_clks and probe
This commit reworks clock handling by moving the mod clock enable into probe
to avoid CLK_SET_RATE_GATE failures and uses devm_clk_get_enabled for the
AHB clock.
> diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
> index 693b491f1e755..8d050ceb72d2f 100644
> --- a/drivers/tty/serial/mxs-auart.c
> +++ b/drivers/tty/serial/mxs-auart.c
[ ... ]
> @@ -1604,17 +1592,21 @@ static int mxs_auart_probe(struct platform_device *pdev)
> if (ret)
> return ret;
>
> + ret = clk_prepare_enable(s->clk);
> + if (ret)
> + return ret;
> +
[ ... ]
> @@ -1697,10 +1686,8 @@ static void mxs_auart_remove(struct platform_device *pdev)
> auart_port[pdev->id] = NULL;
> mxs_auart_free_gpio_irq(s);
> iounmap(s->port.membase);
> - if (is_asm9260_auart(s)) {
> + if (is_asm9260_auart(s))
> clk_disable_unprepare(s->clk);
> - clk_disable_unprepare(s->clk_ahb);
> - }
> }
[Severity: Medium]
Since clk_prepare_enable(s->clk) is now called unconditionally in probe for
all device variants, does keeping the is_asm9260_auart(s) check here cause
a clock enable reference leak for non-ASM9260 hardware when the device is
removed?
I noted that this is fixed later in the series by the patch "serial:
mxs-auart: fix IRQ registration ordering and manage console clock", but
would this intermediate step break bisectability by introducing a temporary
leak?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260603025857.287148-1-rosenp@gmail.com?part=1
next prev parent reply other threads:[~2026-06-03 3:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 2:58 [PATCH 0/3] serial: mxs-auart: devm conversion, clock rework, and IRQ ordering fixes Rosen Penev
2026-06-03 2:58 ` [PATCH 1/3] serial: mxs-auart: rework clock handling in mxs_get_clks and probe Rosen Penev
2026-06-03 3:08 ` sashiko-bot [this message]
2026-06-03 18:45 ` Frank Li
2026-06-03 2:58 ` [PATCH 2/3] serial: mxs-auart: use devm resources for iomem and GPIO IRQs Rosen Penev
2026-06-03 3:18 ` sashiko-bot
2026-06-03 18:48 ` Frank Li
2026-06-03 2:58 ` [PATCH 3/3] serial: mxs-auart: fix IRQ registration ordering and manage console clock Rosen Penev
2026-06-03 3:31 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260603030842.929931F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=imx@lists.linux.dev \
--cc=rosenp@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox