Re: [PATCH v5 2/3] iio: pressure: dps310: add triggered buffer support
From: Rupesh Majhi
Date: Mon Aug 24 2026 - 16:08:02 EST
On Sun, 23 Aug 2026 00:19:14 +0100
Jonathan Cameron <jic23@xxxxxxxxxx> 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