Re: [PATCH v2] regmap: add cache validity to REGCACHE_FLAT
From: Sander Vanheule
Date: Thu Jan 09 2025 - 13:04:41 EST
Hi Mark,
On Thu, 2025-01-09 at 16:48 +0000, Mark Brown wrote:
> On Thu, Jan 09, 2025 at 04:11:05PM +0100, Sander Vanheule wrote:
>
> > +static int regcache_flat_drop(struct regmap *map, unsigned int min,
> > + unsigned int max)
> > +{
> > + struct regcache_flat_data *cache = map->cache;
> > + unsigned int bitmap_min = regcache_flat_get_index(map, min);
> > + unsigned int bitmap_max = regcache_flat_get_index(map, max);
> > +
> > + bitmap_clear(cache->valid, index_min, bitmap_max + 1 - bitmap_min);
>
> This doesn't build:
>
> /build/stage/linux/drivers/base/regmap/regcache-flat.c: In function
> ‘regcache_flat_drop’:
> /build/stage/linux/drivers/base/regmap/regcache-flat.c:120:36: error: ‘index_min’
> undeclared (first use in this function)
> 120 | bitmap_clear(cache->valid, index_min, bitmap_max + 1 - bitmap_min);
> | ^~~~~~~~~
> /build/stage/linux/drivers/base/regmap/regcache-flat.c:120:36: note: each undeclared
> identifier is reported only once for each function it appears in
My apologies., I should have been paying more attention. I've sent a v3 that fixes this.
Best,
Sander