[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87h61do7h5.wl-kuninori.morimoto.gx@renesas.com>
Date: Wed, 21 May 2025 23:43:34 +0000
From: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
To: Ai Chao <aichao@...inos.cn>
Cc: johannes@...solutions.net,
perex@...ex.cz,
tiwai@...e.com,
shengjiu.wang@...il.com,
Xiubo.Lee@...il.com,
festevam@...il.com,
nicoleotsuka@...il.com,
lgirdwood@...il.com,
broonie@...nel.org,
shawnguo@...nel.org,
s.hauer@...gutronix.de,
kernel@...gutronix.de,
jbrunet@...libre.com,
neil.armstrong@...aro.org,
khilman@...libre.com,
martin.blumenstingl@...glemail.com,
srinivas.kandagatla@...aro.org,
zhangzekun11@...wei.com,
krzysztof.kozlowski@...aro.org,
ckeepax@...nsource.cirrus.com,
drhodes@...nsource.cirrus.com,
alexey.klimov@...aro.org,
linuxppc-dev@...ts.ozlabs.org,
linux-sound@...r.kernel.org,
linux-kernel@...r.kernel.org,
imx@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org,
linux-amlogic@...ts.infradead.org,
linux-arm-msm@...r.kernel.org,
linux-renesas-soc@...r.kernel.org
Subject: Re: [PATCH 3/6] ASoC: renesas: Use helper function for_each_child_of_node_scoped()
Hi Ai
Thank you for the patch
> The for_each_child_of_node_scoped() helper provides a scope-based
> clean-up functionality to put the device_node automatically, and
> as such, there is no need to call of_node_put() directly.
>
> Thus, use this helper to simplify the code.
>
> Signed-off-by: Ai Chao <aichao@...inos.cn>
> ---
(snip)
> @@ -1270,16 +1263,15 @@ static int rsnd_dai_of_node(struct rsnd_priv *priv, int *is_graph)
>
> of_node_put(node);
>
> - for_each_child_of_node(np, node) {
> - if (!of_node_name_eq(node, RSND_NODE_DAI))
> + for_each_child_of_node_scoped(np, ports) {
> + if (!of_node_name_eq(ports, RSND_NODE_DAI))
> continue;
>
> - priv->component_dais[i] = of_get_child_count(node);
> + priv->component_dais[i] = of_get_child_count(ports);
> nr += priv->component_dais[i];
> i++;
> if (i >= RSND_MAX_COMPONENT) {
> dev_info(dev, "reach to max component\n");
> - of_node_put(node);
> break;
> }
> }
Here changes "node" to "ports", but please keep "node".
Here is checking "node" instead of "ports".
Except this
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
Thank you for your help !!
Best regards
---
Kuninori Morimoto
Powered by blists - more mailing lists