Thu, Feb 29, 2024 at 04:10:26PM +0100, Nuno Sa kirjoitti: > Use the new cleanup magic for handling mutexes in IIO. This allows us to > greatly simplify some code paths. ... > static void iio_trigger_put_irq(struct iio_trigger *trig, int irq) > { > - mutex_lock(&trig->pool_lock); > + guard(mutex)(&trig->pool_lock); > clear_bit(irq - trig->subirq_base, trig->pool); Another side note: Why do we need atomic bit operation(s)? > - mutex_unlock(&trig->pool_lock); > } -- With Best Regards, Andy Shevchenko