Re: [PATCH v2 2/6] ASoC: aoa: Use helper function for_each_child_of_node_scoped()

2025-05-30 Thread Ai Chao
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

[PATCH v3 0/6] Use helper function for_each_child_of_node_scoped()

2025-05-27 Thread Ai Chao
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

[PATCH v3 4/6] ASoC: meson: Use helper function for_each_child_of_node_scoped()

2025-05-27 Thread Ai Chao
-...@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

[PATCH v3 3/6] ASoC: renesas: Use helper function for_each_child_of_node_scoped()

2025-05-27 Thread 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. Acked-by: Kuninori Morimoto Signed-off-by: Ai Chao --- sound/soc/renesas/rcar/core.c | 35

[PATCH v3 5/6] ASoC: imx-card: Use helper function for_each_child_of_node_scoped()

2025-05-27 Thread 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. Signed-off-by: Ai Chao --- sound/soc/fsl/imx-card.c | 13 + 1 file changed, 5 insertions(+), 8

[PATCH v3 6/6] ASoC: qcom: Use helper function for_each_child_of_node_scoped()

2025-05-27 Thread Ai Chao
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

[PATCH v3 1/6] ALSA: ppc: Use helper function for_each_child_of_node_scoped()

2025-05-27 Thread 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. Signed-off-by: Ai Chao --- sound/ppc/tumbler.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions

[PATCH v3 2/6] ALSA: aoa: Use helper function for_each_child_of_node_scoped()

2025-05-27 Thread Ai Chao
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

Re: [PATCH v2 2/6] ASoC: aoa: Use helper function for_each_child_of_node_scoped()

2025-05-26 Thread Ai Chao
h_child_of_node(){}, used for_each_child_of_node_scoped() is better than for_each_child_of_node(). Best regards, Ai Chao

Re: [PATCH v2 2/6] ASoC: aoa: Use helper function for_each_child_of_node_scoped()

2025-05-26 Thread 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

Re: [PATCH v2 2/6] ASoC: aoa: Use helper function for_each_child_of_node_scoped()

2025-05-26 Thread Ai Chao
child_of_node_scoped is better than for_each_child_of_node. Best regards, Ai Chao

[PATCH v2 3/6] ASoC: renesas: Use helper function for_each_child_of_node_scoped()

2025-05-21 Thread 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

[PATCH v2 6/6] ASoC: qcom: Use helper function for_each_child_of_node_scoped()

2025-05-21 Thread 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. Signed-off-by: Ai Chao --- sound/soc/qcom/lpass-cpu.c

[PATCH v2 5/6] ASoC: imx-card: Use helper function for_each_child_of_node_scoped()

2025-05-21 Thread 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. Signed-off-by: Ai Chao --- sound/soc/fsl/imx-card.c | 13

[PATCH v2 4/6] ASoC: meson: Use helper function for_each_child_of_node_scoped()

2025-05-21 Thread Ai Chao
://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

[PATCH v2 1/6] ASoC: ppc: Use helper function for_each_child_of_node_scoped()

2025-05-21 Thread 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. Signed-off-by: Ai Chao --- sound/ppc/tumbler.c | 5 ++--- 1

[PATCH v2 2/6] ASoC: aoa: Use helper function for_each_child_of_node_scoped()

2025-05-21 Thread 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. Signed-off-by: Ai Chao --- sound/aoa/soundbus/i2sbus/core.c

[PATCH v2 0/6] Use helper function for_each_child_of_node_scoped()

2025-05-21 Thread Ai Chao
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

[PATCH 0/6] Use helper function for_each_child_of_node_scoped()

2025-05-20 Thread Ai Chao
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

[PATCH 4/6] ASoC: meson: Use helper function for_each_child_of_node_scoped()

2025-05-20 Thread 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. Signed-off-by: Ai Chao --- sound/soc/meson/axg-card.c

[PATCH 5/6] ASoC: imx-card: Use helper function for_each_child_of_node_scoped()

2025-05-20 Thread 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. Signed-off-by: Ai Chao --- sound/soc/fsl/imx-card.c | 13

[PATCH 3/6] ASoC: renesas: Use helper function for_each_child_of_node_scoped()

2025-05-20 Thread 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. Signed-off-by: Ai Chao --- sound/soc/renesas/rcar/core.c | 39

[PATCH 1/6] ASoC: ppc: Use helper function for_each_child_of_node_scoped()

2025-05-20 Thread 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. Signed-off-by: Ai Chao --- sound/ppc/tumbler.c | 5 ++--- 1

[PATCH 2/6] ASoC: aoa: Use helper function for_each_child_of_node_scoped()

2025-05-20 Thread 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. Signed-off-by: Ai Chao --- sound/aoa/soundbus/i2sbus/core.c

[PATCH 6/6] ASoC: qcom: Use helper function for_each_child_of_node_scoped()

2025-05-20 Thread 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. Signed-off-by: Ai Chao --- sound/soc/qcom/lpass-cpu.c