[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5a953bf8-857e-4c67-be43-d60cc9b5a34c@baylibre.com>
Date: Fri, 16 Jan 2026 15:51:12 -0600
From: David Lechner <dlechner@...libre.com>
To: Kurt Borja <kuurtb@...il.com>,
Andy Shevchenko <andriy.shevchenko@...el.com>,
Lars-Peter Clausen <lars@...afoo.de>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Jonathan Cameron <jic23@...nel.org>, Benson Leung <bleung@...omium.org>,
Antoniu Miclaus <antoniu.miclaus@...log.com>,
Gwendal Grignou <gwendal@...omium.org>,
Shrikant Raskar <raskar.shree97@...il.com>,
Per-Daniel Olsson <perdaniel.olsson@...s.com>
Cc: Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>, Guenter Roeck <groeck@...omium.org>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org, chrome-platform@...ts.linux.dev
Subject: Re: [PATCH v3 2/7] iio: core: Refactor iio_device_claim_direct()
implementation
On 1/6/26 2:06 AM, Kurt Borja wrote:
> In order to eventually unify the locking API, implement
> iio_device_claim_direct() fully inline, with the use of
> __iio_dev_mode_lock(), which takes care of sparse annotations.
>
> Signed-off-by: Kurt Borja <kuurtb@...il.com>
> ---
...
> diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
> index aecda887d833..3cf340208694 100644
> --- a/include/linux/iio/iio.h
> +++ b/include/linux/iio/iio.h
> @@ -664,31 +664,47 @@ int iio_push_event(struct iio_dev *indio_dev, u64 ev_code, s64 timestamp);
>
> void __iio_dev_mode_lock(struct iio_dev *indio_dev) __acquires(indio_dev);
> void __iio_dev_mode_unlock(struct iio_dev *indio_dev) __releases(indio_dev);
> -bool __iio_device_claim_direct(struct iio_dev *indio_dev);
> -void __iio_device_release_direct(struct iio_dev *indio_dev);
>
> /*
> * Helper functions that allow claim and release of direct mode
> * in a fashion that doesn't generate many false positives from sparse.
> * Note this must remain static inline in the header so that sparse
> - * can see the __acquire() marking. Revisit when sparse supports
> - * __cond_acquires()
> + * can see the __acquires() and __releases() markings.
> + */
> +
nit: I think "attributes" would be more technically correct than
"markings" (since we are touching this).
Powered by blists - more mailing lists