Re: [PATCH v1 2/2] genirq/irqdesc: Balance locking to make sparse happy

From: Andy Shevchenko
Date: Wed Apr 16 2025 - 07:54:03 EST


On Wed, Apr 16, 2025 at 02:52:18PM +0300, Andy Shevchenko wrote:
> On Wed, Apr 16, 2025 at 02:40:34PM +0300, Andy Shevchenko wrote:
> > Sparse is not happy right now about conditional locking and
> > complains:
> >
> > irqdesc.c:899:17: warning: context imbalance in '__irq_get_desc_lock' - wrong count at exit
> >
> > Refactor the code and use __acquire() to make it happy.
> > Annotate the function that it acquires the lock in the
> > similar way how __irq_put_desc_unlock() is marked.
>
> Oh, scratch this, it basically will diminish the idea for the users.

That said, the first patch is okay, in case you want it.

--
With Best Regards,
Andy Shevchenko