From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: "Rupesh Majhi" <zoone.rupert@gmail.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Bill Wendling" <morbo@google.com>,
"David Lechner" <dlechner@baylibre.com>,
"Eddie James" <eajames@linux.ibm.com>,
"Justin Stitt" <justinstitt@google.com>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nick Desaulniers" <ndesaulniers@google.com>,
"Nuno Sá" <nuno.sa@analog.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev
Subject: Re: [PATCH v11 5/5] iio: pressure: dps310: assert the lock at runtime too
Date: Sun, 11 Oct 2026 14:42:02 +0100 [thread overview]
Message-ID: <20261011144202.204fd8c3@jic23-hlaptop> (raw)
In-Reply-To: <asFXwlAOVq1klYL8@ashevche-desk.local>
On Sat, 3 Oct 2026 22:30:10 +0300
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> On Sat, Oct 03, 2026 at 10:09:26PM +0300, Rupesh Majhi wrote:
> > On Fri, Oct 02, 2026 at 10:57:04AM +0300, Andy Shevchenko wrote:
> > > On Fri, Oct 02, 2026 at 10:25:26AM +0300, Rupesh Majhi wrote:
> > > > __must_hold() is clang only and does nothing in GCC builds. Add
> > > > lockdep_assert_held() next to each, so lockdep catches a missing lock
> > > > too.
> > >
> > > Suggested-by?
> >
> > On v10 you said it wasn't really your suggestion, so I dropped it.
> > Happy to add it back if you prefer.
>
> Ah, yeah, I assumed that this will be folded in the original patch that adds
> __must_hold(). In such a case the Suggested-by would be confusing. Since it's
> a separate change (and we have no response from Jonathan on this) the Suggested-by
> is fine. Hope that this clarifies why opposite signals were given. But this is
> not really anyhow critical. Feel free not to add it at all.
Generally I'm in favour of annotations rather than just replying on comments
or similar for when a driver is expected to be holding a lock.
However, here things are simple enough that there were no such comments
- it was just assumed that the lock was going to be held at this 'layer'
and it does end up rather noisy..
So this one, to me, is more doubtful.
Jonathan
>
> > > But we need to hear from Jonathan and others if they like these annotations in
> > > a mere IIO driver.
> >
> > Agreed. It stays the last patch in v12, so it can be dropped on its own.
>
> Yep.
>
prev parent reply other threads:[~2026-10-11 13:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-02 7:25 [PATCH v11 0/5] iio: pressure: dps310: hardware FIFO support Rupesh Majhi
2026-10-02 7:25 ` [PATCH v11 1/5] iio: pressure: dps310: use devm_mutex_init() Rupesh Majhi
2026-10-02 7:47 ` Andy Shevchenko
2026-10-02 7:25 ` [PATCH v11 2/5] iio: pressure: dps310: read buffered samples from the hardware FIFO Rupesh Majhi
2026-10-02 7:53 ` Andy Shevchenko
2026-10-02 7:25 ` [PATCH v11 3/5] iio: pressure: dps310: derive the drain interval from the watermark Rupesh Majhi
2026-10-02 7:54 ` Andy Shevchenko
2026-10-02 7:25 ` [PATCH v11 4/5] iio: pressure: dps310: implement .hwfifo_flush_to_buffer() Rupesh Majhi
2026-10-02 7:25 ` [PATCH v11 5/5] iio: pressure: dps310: assert the lock at runtime too Rupesh Majhi
2026-10-02 7:57 ` Andy Shevchenko
2026-10-03 19:09 ` Rupesh Majhi
2026-10-03 19:30 ` Andy Shevchenko
2026-10-11 13:42 ` Jonathan Cameron [this message]
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=20261011144202.204fd8c3@jic23-hlaptop \
--to=jic23@kernel.org \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=eajames@linux.ibm.com \
--cc=justinstitt@google.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=nuno.sa@analog.com \
--cc=zoone.rupert@gmail.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
all inboxes | Powered by JetHome®