Re: [PATCH v2] regmap: Fix race condition in hwspinlock irqsave routine

From: Yu-Chun Lin

Date: Thu Jan 08 2026 - 22:12:36 EST


> On Wed, Jan 07, 2026 at 11:26:10AM +0800, Yu-Chun Lin wrote:
>
> > v2:
> > - Initialize 'flags' to 0. This fixes a -Werror build failure when
> > CONFIG_HWSPINLOCK is disabled, as the stub function in that case does
> > not initialize the pointer.
>
> > {
> > struct regmap *map = __map;
> > + unsigned long flags;
> >
> > hwspin_lock_timeout_irqsave(map->hwlock, UINT_MAX,
> > - &map->spinlock_flags);
> > + &flags);
> > + map->spinlock_flags = flags;
>
> I'm not seeing that initialisation in the actual patch?

Oops, sorry about that. I made a mistake and accidentally kept the v1 code.
I will fix it in v3.

Yu-Chun