* [PATCH 0/2] mmc: Make sure clk_init_data is fully initialized
@ 2026-08-21 10:06 Geert Uytterhoeven
2026-08-21 10:06 ` [PATCH 1/2] mmc: meson-gx: FIXME: " Geert Uytterhoeven
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21 10:06 UTC (permalink / raw)
To: Ulf Hansson, Neil Armstrong, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl, Michal Simek, Adrian Hunter
Cc: linux-mmc, linux-arm-kernel, linux-amlogic, 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 MMC 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 (2):
mmc: meson-gx: FIXME: Make sure clk_init_data is fully initialized
mmc: sdhci-of-arasan: Make sure clk_init_data is fully initialized
drivers/mmc/host/meson-gx-mmc.c | 2 +-
drivers/mmc/host/sdhci-of-arasan.c | 4 ++--
2 files changed, 3 insertions(+), 3 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] 5+ messages in thread
* [PATCH 1/2] mmc: meson-gx: FIXME: Make sure clk_init_data is fully initialized
2026-08-21 10:06 [PATCH 0/2] mmc: Make sure clk_init_data is fully initialized Geert Uytterhoeven
@ 2026-08-21 10:06 ` Geert Uytterhoeven
2026-08-21 10:06 ` [PATCH 2/2] mmc: sdhci-of-arasan: " Geert Uytterhoeven
2026-08-21 10:56 ` [PATCH 0/2] mmc: " Michal Simek
2 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21 10:06 UTC (permalink / raw)
To: Ulf Hansson, Neil Armstrong, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl, Michal Simek, Adrian Hunter
Cc: linux-mmc, linux-arm-kernel, linux-amlogic, 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.
---
drivers/mmc/host/meson-gx-mmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index 694bb443d5f3febf..698febdcd498826c 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -418,7 +418,7 @@ static int meson_mmc_clk_set(struct meson_host *host, unsigned long rate,
*/
static int meson_mmc_clk_init(struct meson_host *host)
{
- struct clk_init_data init;
+ struct clk_init_data init = {};
struct clk_mux *mux;
struct clk_divider *div;
char clk_name[32];
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] mmc: sdhci-of-arasan: Make sure clk_init_data is fully initialized
2026-08-21 10:06 [PATCH 0/2] mmc: Make sure clk_init_data is fully initialized Geert Uytterhoeven
2026-08-21 10:06 ` [PATCH 1/2] mmc: meson-gx: FIXME: " Geert Uytterhoeven
@ 2026-08-21 10:06 ` Geert Uytterhoeven
2026-08-21 10:56 ` [PATCH 0/2] mmc: " Michal Simek
2 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21 10:06 UTC (permalink / raw)
To: Ulf Hansson, Neil Armstrong, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl, Michal Simek, Adrian Hunter
Cc: linux-mmc, linux-arm-kernel, linux-amlogic, 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.
---
drivers/mmc/host/sdhci-of-arasan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
index 4ca73e7d799ead0d..0ee22923ad568124 100644
--- a/drivers/mmc/host/sdhci-of-arasan.c
+++ b/drivers/mmc/host/sdhci-of-arasan.c
@@ -1552,8 +1552,8 @@ sdhci_arasan_register_sdcardclk(struct sdhci_arasan_data *sdhci_arasan,
struct device *dev)
{
struct sdhci_arasan_clk_data *clk_data = &sdhci_arasan->clk_data;
+ struct clk_init_data sdcardclk_init = {};
struct device_node *np = dev->of_node;
- struct clk_init_data sdcardclk_init;
const char *parent_clk_name;
int ret;
@@ -1604,8 +1604,8 @@ sdhci_arasan_register_sampleclk(struct sdhci_arasan_data *sdhci_arasan,
struct device *dev)
{
struct sdhci_arasan_clk_data *clk_data = &sdhci_arasan->clk_data;
+ struct clk_init_data sampleclk_init = {};
struct device_node *np = dev->of_node;
- struct clk_init_data sampleclk_init;
const char *parent_clk_name;
int ret;
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] mmc: Make sure clk_init_data is fully initialized
2026-08-21 10:06 [PATCH 0/2] mmc: Make sure clk_init_data is fully initialized Geert Uytterhoeven
2026-08-21 10:06 ` [PATCH 1/2] mmc: meson-gx: FIXME: " Geert Uytterhoeven
2026-08-21 10:06 ` [PATCH 2/2] mmc: sdhci-of-arasan: " Geert Uytterhoeven
@ 2026-08-21 10:56 ` Michal Simek
2026-08-21 11:36 ` Geert Uytterhoeven
2 siblings, 1 reply; 5+ messages in thread
From: Michal Simek @ 2026-08-21 10:56 UTC (permalink / raw)
To: Geert Uytterhoeven, Ulf Hansson, Neil Armstrong, Kevin Hilman,
Jerome Brunet, Martin Blumenstingl, Adrian Hunter
Cc: linux-mmc, linux-arm-kernel, linux-amlogic, linux-clk
On 8/21/26 12:06, Geert Uytterhoeven wrote:
> 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 MMC 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 (2):
> mmc: meson-gx: FIXME: Make sure clk_init_data is fully initialized
It looks like a broken series to me.
Thanks,
Michal
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] mmc: Make sure clk_init_data is fully initialized
2026-08-21 10:56 ` [PATCH 0/2] mmc: " Michal Simek
@ 2026-08-21 11:36 ` Geert Uytterhoeven
0 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2026-08-21 11:36 UTC (permalink / raw)
To: Michal Simek
Cc: Ulf Hansson, Neil Armstrong, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl, Adrian Hunter, linux-mmc, linux-arm-kernel,
linux-amlogic, linux-clk
Hi Michal,
On Fri, 21 Aug 2026 at 12:56, Michal Simek <michal.simek@amd.com> wrote:
> On 8/21/26 12:06, 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.
> >
> > 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 MMC 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 (2):
> > mmc: meson-gx: FIXME: Make sure clk_init_data is fully initialized
>
> It looks like a broken series to me.
Doh, I made a silly mistake while filling in the correct patch prefix...
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] 5+ messages in thread
end of thread, other threads:[~2026-08-21 11:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-21 10:06 [PATCH 0/2] mmc: Make sure clk_init_data is fully initialized Geert Uytterhoeven
2026-08-21 10:06 ` [PATCH 1/2] mmc: meson-gx: FIXME: " Geert Uytterhoeven
2026-08-21 10:06 ` [PATCH 2/2] mmc: sdhci-of-arasan: " Geert Uytterhoeven
2026-08-21 10:56 ` [PATCH 0/2] mmc: " Michal Simek
2026-08-21 11:36 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox