Re: [PATCH v5 2/3] iio: pressure: dps310: add triggered buffer support

Rupesh Majhi <[email protected]>
Newsgroups org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Sun, 23 Aug 2026 00:19:14 +0100
Jonathan Cameron <[email protected]> wrote:

> Use the sparse markings to make it clear and testable - thus not needing the
> comment. __must_hold(&data->lock)

Patch 6 opts dps310.o into the analysis, so they are checked and not just
documentation. Clean under clang 23.1.0, and it does run: dropping the
lock around dps310_fill_scan() fails the build. Patch is last and touches
only the Makefile, so drop it if IIO would rather not opt in yet.

> It isn't necessary to use guard/scoped_guard() for all locks in a driver
> if they actually hurt readability.  I think that is the case here.

Plain lock and unlock in the trigger handler and in the FIFO work. Kept
guard() in the three places where the lock covers a whole function.

Rupesh
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.