Re: [PATCH] ASoC: tegra: Fix uninitialized flat cache warning in tegra210_ahub
From: Sander Vanheule
Date: Mon Dec 08 2025 - 16:05:57 EST
Hi,
On Mon, 2025-12-08 at 10:50 +0530, Sheetal . wrote:
> From: sheetal <sheetal@xxxxxxxxxx>
>
> The tegra210_ahub driver started triggering a warning after commit
> e062bdfdd6ad ("regmap: warn users about uninitialized flat cache"),
> which flags drivers using REGCACHE_FLAT without register defaults.
> Since the driver omits default definitions because its registers are
> zero initialized, the following warning is shown:
>
> WARNING KERN tegra210-ahub 2900800.ahub: using zero-initialized flat cache,
> this may cause unexpected behavior
>
> Switch to REGCACHE_FLAT_S which is the recommended cache type for
> sparse register maps without defaults. This cache type initializes
> entries on-demand from hardware, eliminating the warning while using
> memory efficiently.
>
> Fixes: e062bdfdd6ad ("regmap: warn users about uninitialized flat cache")
I disagree with this tag. The commit is working as intended by giving a warning.
This device's reset state happens to match the zero-initialization of the flat
cache, so there were no issues here. An earlier version of this sparse flat
cache indicated a potential problem with another driver, so there are likely
drivers out there that do need fixing:
https://lore.kernel.org/all/a2f7e2c3-f072-40f7-a865-5693b82b636e@xxxxxxxxxxxxx/
Regardless, this patch could still be material for 6.19 to avoid unneeded
warnings, but that's up to Mark.
Best,
Sander