Re: [PATCH v9 1/3] iio: pressure: dps310: read buffered samples from the hardware FIFO
From: Andy Shevchenko
Date: Wed Sep 30 2026 - 05:08:25 EST
On Wed, Sep 30, 2026 at 11:29:52AM +0300, Rupesh Majhi wrote:
> On Tue, Sep 29, 2026 at 12:55:22AM +0300, Andy Shevchenko wrote:
> > On Tue, Sep 29, 2026 at 12:11:25AM +0300, Rupesh Majhi wrote:
> > > +/* Returns which measurement the entry came from, or a negative error */
> > > +static int dps310_fifo_read_entry(struct dps310_data *data, s32 *value)
> > > + __must_hold(&data->lock)
> >
> > Hmm... Don't you want to also add lockdep annotations?
>
> All __must_hold() functions here are static and called only from
> dps310.c, which is opted into context analysis since patch 10 of v8, so
> clang checks every caller. If you still want lockdep_assert_held() I
> would add it to all 20 in a separate patch, as 12 are already applied.
__must_hold() is not a function, it's a compiler attribute.
And to be precise the clang compiler attribute. It's a no-op in GCC.
--
With Best Regards,
Andy Shevchenko