From: "Nuno Sá" <noname.nuno@gmail.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>,
Nuno Sa <nuno.sa@analog.com>
Cc: linux-iio@vger.kernel.org, Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>
Subject: Re: [PATCH v3 2/4] iio: trigger: move to the cleanup.h magic
Date: Mon, 18 Mar 2024 10:22:17 +0100 [thread overview]
Message-ID: <6d6697113e4b71d85f17c570167925c4c11de52c.camel@gmail.com> (raw)
In-Reply-To: <ZfX1Yv456gRr0RU4@surfacebook.localdomain>
On Sat, 2024-03-16 at 21:39 +0200, Andy Shevchenko wrote:
> 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)?
>
Did not checked the code but my guess is that the lock is always grabbed so we
likely don't need the atomic variants. But that's something for a future patch.
- Nuno Sá
next prev parent reply other threads:[~2024-03-18 9:18 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-29 15:10 [PATCH v3 0/4] iio: move IIO to the cleanup.h magic Nuno Sa
2024-02-29 15:10 ` [PATCH v3 1/4] iio: core: move to " Nuno Sa
2024-02-29 15:10 ` [PATCH v3 2/4] iio: trigger: move to the " Nuno Sa
2024-03-16 19:32 ` Andy Shevchenko
2024-03-18 12:33 ` Jonathan Cameron
2024-03-18 13:12 ` Andy Shevchenko
2024-03-18 14:15 ` Jonathan Cameron
2024-03-16 19:39 ` Andy Shevchenko
2024-03-18 9:22 ` Nuno Sá [this message]
2024-02-29 15:10 ` [PATCH v3 3/4] iio: buffer: iio: core: " Nuno Sa
2024-03-16 19:38 ` Andy Shevchenko
2024-03-18 9:23 ` Nuno Sá
2024-03-18 12:35 ` Jonathan Cameron
2024-03-16 19:49 ` Andy Shevchenko
2024-02-29 15:10 ` [PATCH v3 4/4] iio: inkern: " Nuno Sa
2024-03-03 14:24 ` Jonathan Cameron
2024-03-04 8:04 ` Nuno Sá
2024-03-09 17:41 ` Jonathan Cameron
2024-03-16 13:26 ` Jonathan Cameron
2024-03-16 19:48 ` Andy Shevchenko
2024-03-18 9:20 ` Nuno Sá
2024-03-23 18:09 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6d6697113e4b71d85f17c570167925c4c11de52c.camel@gmail.com \
--to=noname.nuno@gmail.com \
--cc=andy.shevchenko@gmail.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=nuno.sa@analog.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox