Hi Johannes:
Thanks for your feedback. I will drop it.
On Mon, 2025-05-26 at 16:20 +0800, Ai Chao wrote:
Hi Johannes:
for_each_child_of_node.
You still haven't explained why it's even correct.
johannes
The for_each_child_of_node() function is used to iterate over all child
This patch series introduces wrapper functions for_each_child_of_node_scoped().
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.
Summary:
- Patch 1 ALSA: p
-...@intel.com/
Signed-off-by: Ai Chao
---
sound/soc/meson/axg-card.c | 3 +--
sound/soc/meson/meson-card-utils.c | 16 +---
2 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/sound/soc/meson/axg-card.c b/sound/soc/meson/axg-card.c
index a2dfccb7990f..b4dca80e15e4 100644
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.
Acked-by: Kuninori Morimoto
Signed-off-by: Ai Chao
---
sound/soc/renesas/rcar/core.c | 35
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.
Signed-off-by: Ai Chao
---
sound/soc/fsl/imx-card.c | 13 +
1 file changed, 5 insertions(+), 8
The for_each_child_of_node_scoped() helper provides a scope-based
clean-up functionality to put the device_node automatically.
Signed-off-by: Ai Chao
---
sound/soc/qcom/lpass-cpu.c | 3 +--
sound/soc/qcom/qdsp6/q6afe-dai.c | 3 +--
sound/soc/qcom/qdsp6/q6asm-dai.c | 4 +---
3 files
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.
Signed-off-by: Ai Chao
---
sound/ppc/tumbler.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions
The for_each_child_of_node_scoped() helper provides a scope-based
clean-up functionality to put the device_node automatically.
Signed-off-by: Ai Chao
---
sound/aoa/soundbus/i2sbus/core.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/sound/aoa/soundbus/i2sbus/core.c
h_child_of_node(){}, used for_each_child_of_node_scoped() is
better than for_each_child_of_node().
Best regards,
Ai Chao
_node() increments the child node's reference count in
each iteration but does not decrement it automatically.
If of_node_put() is not called manually, the reference count will never
reach zero, resulting in a memory leak of the node.
Best regards,
Ai Chao
child_of_node_scoped is better than
for_each_child_of_node.
Best regards,
Ai Chao
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.
Acked-by: Kuninori Morimoto
Signed-off-by: Ai Chao
---
sound
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
---
sound/soc/qcom/lpass-cpu.c
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
---
sound/soc/fsl/imx-card.c | 13
://lore.kernel.org/oe-kbuild-all/202505210557.epjig9bq-...@intel.com/
Signed-off-by: Ai Chao
---
sound/soc/meson/axg-card.c | 3 +--
sound/soc/meson/meson-card-utils.c | 16 +---
2 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/sound/soc/meson/axg-card.c b/sound/soc/meson/axg
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
---
sound/ppc/tumbler.c | 5 ++---
1
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
---
sound/aoa/soundbus/i2sbus/core.c
This patch series introduces wrapper functions for_each_child_of_node_scoped().
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 sim
This patch series introduces wrapper functions
for_each_child_of_node_scoped().
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 si
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
---
sound/soc/meson/axg-card.c
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
---
sound/soc/fsl/imx-card.c | 13
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
---
sound/soc/renesas/rcar/core.c | 39
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
---
sound/ppc/tumbler.c | 5 ++---
1
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
---
sound/aoa/soundbus/i2sbus/core.c
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
---
sound/soc/qcom/lpass-cpu.c
25 matches
Mail list logo