Re: [PATCH v5 1/2] regmap: add flat cache with sparse validity

From: Mark Brown

Date: Tue Oct 28 2025 - 07:38:53 EST


On Thu, Oct 23, 2025 at 03:50:31PM +0200, Sander Vanheule wrote:

> - map->cache = kcalloc(regcache_flat_get_index(map, map->max_register)
> - + 1, sizeof(unsigned int), map->alloc_flags);

> + cache = kmalloc(cache_data_size, map->alloc_flags);

kcalloc() does a zero initialisation so should be replace by kzalloc()
rather than kmalloc(), otherwise we break existing users who rely on the
zero initialisation.

Attachment: signature.asc
Description: PGP signature