Re: [PATCH 2/2] mmc: sdhci-of-arasan: Make sure clk_init_data is fully initialized
Adrian Hunter <[email protected]>
| Newsgroups | org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-amlogic,org.kernel.vger.linux-clk,org.kernel.vger.linux-mmc |
|---|---|
| Organization | Intel Finland Oy, Registered Address: c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo, Business Identity Code: 0357606 - 4, Domiciled in Helsinki |
| Message-ID | <[email protected]> |
On 21/08/2026 13: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. > > 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 <[email protected]> Acked-by: Adrian Hunter <[email protected]> > --- > 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; >