[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <vi1wqm.t4ubkw.2zniph-qmf@polaris.svanheule.net>
Date: Tue, 28 Oct 2025 11:50:55 +0000
From: Sander Vanheule <sander@...nheule.net>
To: broonie@...nel.org
Cc: gregkh@...uxfoundation.org,rafael@...nel.org,dakr@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 1/2] regmap: add flat cache with sparse validity
Hi Mark,
On Tuesday, 28 October 2025, Mark Brown wrote:
> 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.
Of course. The intention is to maintain backward compatibility with the current flat cache, so I'll send a respin amending this.
Best,
Sander
Powered by blists - more mailing lists