Re: [PATCH net-next 01/24] locking/local_lock: Introduce guard definition for local_lock.
From: Sebastian Andrzej Siewior
Date: Thu Jan 11 2024 - 11:21:59 EST
On 2023-12-18 09:16:49 [+0100], Paolo Abeni wrote:
> > --- a/include/linux/local_lock.h
> > +++ b/include/linux/local_lock.h
> > @@ -51,4 +51,15 @@
> > #define local_unlock_irqrestore(lock, flags) \
> > __local_unlock_irqrestore(lock, flags)
> >
> > +DEFINE_LOCK_GUARD_1(local_lock, local_lock_t,
> > + local_lock(_T->lock),
> > + local_unlock(_T->lock))
> > +DEFINE_LOCK_GUARD_1(local_lock_irq, local_lock_t,
> > + local_lock_irq(_T->lock),
> > + local_unlock_irq(_T->lock))
>
> DEFINE_GUARD should fit for the 2 above, right?
Yes, that will work. Let me update it.
> Cheers,
>
> Paolo
Sebastian