From: sashiko-bot@kernel.org
To: "Zhu Jun" <zhujun2@cmss.chinamobile.com>
Cc: linux-clk@vger.kernel.org
Subject: Re: [PATCH] clk: keystone: sci-clk: Release nodes while scanning DT clocks
Date: Thu, 12 Nov 2026 02:37:25 +0000 [thread overview]
Message-ID: <sashiko-outbox-210209@kernel.org> (raw)
In-Reply-To: <20261112023137.118241-1-zhujun2@cmss.chinamobile.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] clk: keystone: sci-clk: split __free() definition in
ti_sci_scan_clocks_from_dt()
--
commit f771030e1cdc7fd996c4caa11e1e8cac88d5ff99
Author: Zhu Jun <zhujun2@cmss.chinamobile.com>
clk: keystone: sci-clk: Release nodes while scanning DT clocks
This commit adds __free(device_node) annotations in
ti_sci_scan_clocks_from_dt() to release device_node references obtained
while scanning the device tree.
> diff --git a/drivers/clk/keystone/sci-clk.c b/drivers/clk/keystone/sci-clk.c
> index 967f779003587..433bdca8ac836 100644
> --- a/drivers/clk/keystone/sci-clk.c
> +++ b/drivers/clk/keystone/sci-clk.c
[ ... ]
> @@ -573,13 +573,16 @@ static int ti_sci_scan_clocks_from_dt(struct sci_clk_provider *provider)
> index = 0;
>
> do {
> + struct device_node *clk_node __free(device_node) = NULL;
> +
> ret = of_parse_phandle_with_args(np, *clk_name,
> "#clock-cells", index,
> &args);
> if (ret)
> break;
>
> - if (args.args_count == 2 && args.np == dev->of_node) {
> + clk_node = args.np;
> + if (args.args_count == 2 && clk_node == dev->of_node) {
[Severity: Low]
This isn't a bug, but cleanup.h recommends defining and initializing
__free() variables in a single statement rather than initializing to NULL
and assigning later when the scope allows it. Since the error check on
ret breaks out of the loop before clk_node is used, clk_node can be
defined directly at the assignment:
struct device_node *clk_node __free(device_node) = args.np;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261112023137.118241-1-zhujun2@cmss.chinamobile.com?part=1
prev parent reply other threads:[~2026-11-12 2:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 2:31 [PATCH] clk: keystone: sci-clk: Release nodes while scanning DT clocks Zhu Jun
2026-11-12 2:37 ` sashiko-bot [this message]
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=sashiko-outbox-210209@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=zhujun2@cmss.chinamobile.com \
/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