Re: [PATCH v2] regmap: add cache validity to REGCACHE_FLAT

From: Mark Brown
Date: Thu Jan 09 2025 - 11:48:59 EST


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

Attachment: signature.asc
Description: PGP signature