Re: next-20250819: sdhci-cadence.c error variable 'hrs37_mode' is uninitialized when used here [-Werror,-Wuninitialized]
From: Nathan Chancellor
Date: Wed Aug 20 2025 - 12:23:50 EST
Hi Naresh,
On Wed, Aug 20, 2025 at 06:43:51PM +0530, Naresh Kamboju wrote:
> The following build warnings / errors noticed with arm64 defconfig
> and x86 allyesconfig with clang-20 and clang-nightly toolchains.
>
> Regression Analysis:
> - New regression? yes
> - Reproducibility? yes
>
> Build regression: next-20250819 sdhci-cadence.c error variable
> 'hrs37_mode' is uninitialized when used here [-Werror,-Wuninitialized]
>
> Reported-by: Linux Kernel Functional Testing <lkft@xxxxxxxxxx>
>
> ## Build log
> drivers/mmc/host/sdhci-cadence.c:297:9: error: variable 'hrs37_mode'
> is uninitialized when used here [-Werror,-Wuninitialized]
> 297 | writel(hrs37_mode, hrs37_reg);
> | ^~~~~~~~~~
> drivers/mmc/host/sdhci-cadence.c:291:16: note: initialize the variable
> 'hrs37_mode' to silence this warning
> 291 | u32 hrs37_mode;
> | ^
> | = 0
Thanks for the report. I sent a fix for this yesterday:
https://lore.kernel.org/20250819-mmc-sdhci-cadence-fix-uninit-hrs37_mode-v1-1-94aa2d0c438a@xxxxxxxxxx/
Cheers,
Nathan