* [PATCH 0/3] ASoC: Make sure clk_init_data is fully initialized
@ 2026-08-21 8:52 Geert Uytterhoeven
2026-08-21 8:52 ` [PATCH 1/3] ASoC: codecs: lpass: " Geert Uytterhoeven
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21 8:52 UTC (permalink / raw)
To: Srinivas Kandagatla, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Shenghao Ding, Kevin Lu, Baojun Xu, Sen Wang
Cc: linux-sound, linux-arm-msm, linux-clk, Geert Uytterhoeven
Hi all,
The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need. However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.
Hence this series aims to make sure all members are fully initialized,
to avoid such bugs, and to prevent future breakage when converting
drivers to a different method for specifying the parents.
Part One[1] fixed all cases that I identified to be real bugs, in
response to a crash I saw on BeagleBone Black.
This series is the ASoC subpart of Part Two, which fixes remaining cases
that are currently harmless. These are still fragile, and may cause
future breakage when converting drivers to a different method for
specifying the parents.
Thanks for your comments!
[1] "[PATCH treewide 0/5] clk: Make sure clk_init_data is fully
initialized (part 1)"
https://lore.kernel.org/cover.1787165329.git.geert+renesas@glider.be
Geert Uytterhoeven (3):
ASoC: codecs: lpass: Make sure clk_init_data is fully initialized
ASoC: codecs: wcd934x: Make sure clk_init_data is fully initialized
ASoC: tlv320aic32x4: Make sure clk_init_data is fully initialized
sound/soc/codecs/lpass-rx-macro.c | 2 +-
sound/soc/codecs/lpass-tx-macro.c | 2 +-
sound/soc/codecs/lpass-va-macro.c | 2 +-
sound/soc/codecs/lpass-wsa-macro.c | 2 +-
sound/soc/codecs/tlv320aic32x4-clk.c | 2 +-
sound/soc/codecs/wcd934x.c | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
--
2.43.0
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 1/3] ASoC: codecs: lpass: Make sure clk_init_data is fully initialized
2026-08-21 8:52 [PATCH 0/3] ASoC: Make sure clk_init_data is fully initialized Geert Uytterhoeven
@ 2026-08-21 8:52 ` Geert Uytterhoeven
2026-08-24 15:15 ` Brian Masney
2026-08-21 8:52 ` [PATCH 2/3] ASoC: codecs: wcd934x: " Geert Uytterhoeven
2026-08-21 8:52 ` [PATCH 3/3] ASoC: tlv320aic32x4: " Geert Uytterhoeven
2 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21 8:52 UTC (permalink / raw)
To: Srinivas Kandagatla, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Shenghao Ding, Kevin Lu, Baojun Xu, Sen Wang
Cc: linux-sound, linux-arm-msm, linux-clk, Geert Uytterhoeven
The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need. However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.
Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
sound/soc/codecs/lpass-rx-macro.c | 2 +-
sound/soc/codecs/lpass-tx-macro.c | 2 +-
sound/soc/codecs/lpass-va-macro.c | 2 +-
sound/soc/codecs/lpass-wsa-macro.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c
index 282a6aaa9986554d..2e74ec1a52f8a0f7 100644
--- a/sound/soc/codecs/lpass-rx-macro.c
+++ b/sound/soc/codecs/lpass-rx-macro.c
@@ -3732,8 +3732,8 @@ static int rx_macro_register_mclk_output(struct rx_macro *rx)
struct device *dev = rx->dev;
const char *parent_clk_name = NULL;
const char *clk_name = "lpass-rx-mclk";
+ struct clk_init_data init = {};
struct clk_hw *hw;
- struct clk_init_data init;
int ret;
if (rx->npl)
diff --git a/sound/soc/codecs/lpass-tx-macro.c b/sound/soc/codecs/lpass-tx-macro.c
index a8e83eb60ba2d762..4ac8a11f30621c0b 100644
--- a/sound/soc/codecs/lpass-tx-macro.c
+++ b/sound/soc/codecs/lpass-tx-macro.c
@@ -2210,8 +2210,8 @@ static int tx_macro_register_mclk_output(struct tx_macro *tx)
struct device *dev = tx->dev;
const char *parent_clk_name = NULL;
const char *clk_name = "lpass-tx-mclk";
+ struct clk_init_data init = {};
struct clk_hw *hw;
- struct clk_init_data init;
int ret;
if (tx->npl)
diff --git a/sound/soc/codecs/lpass-va-macro.c b/sound/soc/codecs/lpass-va-macro.c
index dbc5795b9273f131..a3b3af0d7db3cf1f 100644
--- a/sound/soc/codecs/lpass-va-macro.c
+++ b/sound/soc/codecs/lpass-va-macro.c
@@ -1414,7 +1414,7 @@ static int va_macro_register_fsgen_output(struct va_macro *va)
struct device_node *np = dev->of_node;
const char *parent_clk_name;
const char *clk_name = "fsgen";
- struct clk_init_data init;
+ struct clk_init_data init = {};
int ret;
if (va->has_npl_clk)
diff --git a/sound/soc/codecs/lpass-wsa-macro.c b/sound/soc/codecs/lpass-wsa-macro.c
index cfd2ac0a6cdac4af..f6ef7f188b1ad408 100644
--- a/sound/soc/codecs/lpass-wsa-macro.c
+++ b/sound/soc/codecs/lpass-wsa-macro.c
@@ -2638,10 +2638,10 @@ static const struct clk_ops swclk_gate_ops = {
static int wsa_macro_register_mclk_output(struct wsa_macro *wsa)
{
+ struct clk_init_data init = {};
struct device *dev = wsa->dev;
const char *parent_clk_name;
struct clk_hw *hw;
- struct clk_init_data init;
int ret;
if (wsa->npl)
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 1/3] ASoC: codecs: lpass: Make sure clk_init_data is fully initialized
2026-08-21 8:52 ` [PATCH 1/3] ASoC: codecs: lpass: " Geert Uytterhoeven
@ 2026-08-24 15:15 ` Brian Masney
0 siblings, 0 replies; 7+ messages in thread
From: Brian Masney @ 2026-08-24 15:15 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Srinivas Kandagatla, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Shenghao Ding, Kevin Lu, Baojun Xu, Sen Wang,
linux-sound, linux-arm-msm, linux-clk
On Fri, Aug 21, 2026 at 10:52:55AM +0200, Geert Uytterhoeven wrote:
> The clk_init_data structure contains several mutually-exclusive members
> for different methods to specify the possible parents of a clock,
> prompting drivers to initialize only the members they need. However,
> not initializing all members may cause subtle issues, which are only
> exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
> enabled.
>
> Make sure all members are fully initialized, to avoid such bugs, and to
> prevent future breakage when converting drivers to a different method
> for specifying the parents.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Brian Masney <bmasney@redhat.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/3] ASoC: codecs: wcd934x: Make sure clk_init_data is fully initialized
2026-08-21 8:52 [PATCH 0/3] ASoC: Make sure clk_init_data is fully initialized Geert Uytterhoeven
2026-08-21 8:52 ` [PATCH 1/3] ASoC: codecs: lpass: " Geert Uytterhoeven
@ 2026-08-21 8:52 ` Geert Uytterhoeven
2026-08-24 15:15 ` Brian Masney
2026-08-21 8:52 ` [PATCH 3/3] ASoC: tlv320aic32x4: " Geert Uytterhoeven
2 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21 8:52 UTC (permalink / raw)
To: Srinivas Kandagatla, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Shenghao Ding, Kevin Lu, Baojun Xu, Sen Wang
Cc: linux-sound, linux-arm-msm, linux-clk, Geert Uytterhoeven
The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need. However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.
Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
sound/soc/codecs/wcd934x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wcd934x.c b/sound/soc/codecs/wcd934x.c
index caca5cc2510040d6..0ed24cca088f8392 100644
--- a/sound/soc/codecs/wcd934x.c
+++ b/sound/soc/codecs/wcd934x.c
@@ -2130,9 +2130,9 @@ static struct clk *wcd934x_register_mclk_output(struct wcd934x_codec *wcd)
struct device *dev = wcd->dev;
struct device_node *np = dev->parent->of_node;
const char *parent_clk_name = NULL;
+ struct clk_init_data init = {};
const char *clk_name = "mclk";
struct clk_hw *hw;
- struct clk_init_data init;
int ret;
if (of_property_read_u32(np, "clock-frequency", &wcd->rate))
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 2/3] ASoC: codecs: wcd934x: Make sure clk_init_data is fully initialized
2026-08-21 8:52 ` [PATCH 2/3] ASoC: codecs: wcd934x: " Geert Uytterhoeven
@ 2026-08-24 15:15 ` Brian Masney
0 siblings, 0 replies; 7+ messages in thread
From: Brian Masney @ 2026-08-24 15:15 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Srinivas Kandagatla, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Shenghao Ding, Kevin Lu, Baojun Xu, Sen Wang,
linux-sound, linux-arm-msm, linux-clk
On Fri, Aug 21, 2026 at 10:52:56AM +0200, Geert Uytterhoeven wrote:
> The clk_init_data structure contains several mutually-exclusive members
> for different methods to specify the possible parents of a clock,
> prompting drivers to initialize only the members they need. However,
> not initializing all members may cause subtle issues, which are only
> exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
> enabled.
>
> Make sure all members are fully initialized, to avoid such bugs, and to
> prevent future breakage when converting drivers to a different method
> for specifying the parents.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Brian Masney <bmasney@redhat.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/3] ASoC: tlv320aic32x4: Make sure clk_init_data is fully initialized
2026-08-21 8:52 [PATCH 0/3] ASoC: Make sure clk_init_data is fully initialized Geert Uytterhoeven
2026-08-21 8:52 ` [PATCH 1/3] ASoC: codecs: lpass: " Geert Uytterhoeven
2026-08-21 8:52 ` [PATCH 2/3] ASoC: codecs: wcd934x: " Geert Uytterhoeven
@ 2026-08-21 8:52 ` Geert Uytterhoeven
2026-08-24 15:15 ` Brian Masney
2 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21 8:52 UTC (permalink / raw)
To: Srinivas Kandagatla, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Shenghao Ding, Kevin Lu, Baojun Xu, Sen Wang
Cc: linux-sound, linux-arm-msm, linux-clk, Geert Uytterhoeven
The clk_init_data structure contains several mutually-exclusive members
for different methods to specify the possible parents of a clock,
prompting drivers to initialize only the members they need. However,
not initializing all members may cause subtle issues, which are only
exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
enabled.
Make sure all members are fully initialized, to avoid such bugs, and to
prevent future breakage when converting drivers to a different method
for specifying the parents.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
sound/soc/codecs/tlv320aic32x4-clk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/tlv320aic32x4-clk.c b/sound/soc/codecs/tlv320aic32x4-clk.c
index deed61650e09db0b..ad15ce9c607915e4 100644
--- a/sound/soc/codecs/tlv320aic32x4-clk.c
+++ b/sound/soc/codecs/tlv320aic32x4-clk.c
@@ -451,8 +451,8 @@ static struct aic32x4_clkdesc aic32x4_clkdesc_array[] = {
static struct clk *aic32x4_register_clk(struct device *dev,
struct aic32x4_clkdesc *desc)
{
- struct clk_init_data init;
struct clk_aic32x4 *priv;
+ struct clk_init_data init = {};
const char *devname = dev_name(dev);
init.ops = desc->ops;
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 3/3] ASoC: tlv320aic32x4: Make sure clk_init_data is fully initialized
2026-08-21 8:52 ` [PATCH 3/3] ASoC: tlv320aic32x4: " Geert Uytterhoeven
@ 2026-08-24 15:15 ` Brian Masney
0 siblings, 0 replies; 7+ messages in thread
From: Brian Masney @ 2026-08-24 15:15 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Srinivas Kandagatla, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Shenghao Ding, Kevin Lu, Baojun Xu, Sen Wang,
linux-sound, linux-arm-msm, linux-clk
On Fri, Aug 21, 2026 at 10:52:57AM +0200, Geert Uytterhoeven wrote:
> The clk_init_data structure contains several mutually-exclusive members
> for different methods to specify the possible parents of a clock,
> prompting drivers to initialize only the members they need. However,
> not initializing all members may cause subtle issues, which are only
> exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is
> enabled.
>
> Make sure all members are fully initialized, to avoid such bugs, and to
> prevent future breakage when converting drivers to a different method
> for specifying the parents.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Brian Masney <bmasney@redhat.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-08-24 15:15 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-21 8:52 [PATCH 0/3] ASoC: Make sure clk_init_data is fully initialized Geert Uytterhoeven
2026-08-21 8:52 ` [PATCH 1/3] ASoC: codecs: lpass: " Geert Uytterhoeven
2026-08-24 15:15 ` Brian Masney
2026-08-21 8:52 ` [PATCH 2/3] ASoC: codecs: wcd934x: " Geert Uytterhoeven
2026-08-24 15:15 ` Brian Masney
2026-08-21 8:52 ` [PATCH 3/3] ASoC: tlv320aic32x4: " Geert Uytterhoeven
2026-08-24 15:15 ` Brian Masney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox