* [PATCH v4 0/9] iio: enable context analysis for all drivers
@ 2026-10-27 12:49 Rupesh Majhi
2026-10-27 12:49 ` [PATCH v4 1/9] iio: adc: qcom-spmi-adc5-gen3: fix lock annotations on mutex helpers Rupesh Majhi
` (8 more replies)
0 siblings, 9 replies; 14+ messages in thread
From: Rupesh Majhi @ 2026-10-27 12:49 UTC (permalink / raw)
To: Alex Lanzano, Andy Shevchenko, Benson Leung, David Lechner,
Guenter Roeck, Jagath Jog J, Javier Carrasco,
Jean-Baptiste Maneyrol, Jerome Brunet, Jinseob Kim,
Jonathan Cameron, Kevin Hilman, Lorenzo Bianconi,
Martin Blumenstingl, Matti Vaittinen, Neil Armstrong,
Nuno Sá,
Remi Buisson
Cc: chrome-platform, linux-amlogic, linux-arm-kernel, linux-arm-msm,
linux-iio, linux-kernel, Rupesh Majhi, Marco Elver,
Bart Van Assche
Jonathan asked for the qcom-spmi-adc5-gen3 fix to become the first
patch of a series that enables context analysis across IIO [1]. This
is that series.
With CONTEXT_ANALYSIS := y in every drivers/iio Makefile, testing gives
256 warnings and 2 errors in 126 files (x86_64 allmodconfig, clang
23.1).
Patch 1 fixes the two qcom errors, as v3 did, but names the lock the
way Bart suggested [2]. Patch 2 annotates the two conditional mode
claims in iio.h, which accounts for 241 of the warnings, in 120 files.
Patch 3 covers the core helpers behind them. Patches 4 to 8 annotate
lock helpers in kx022a, meson_saradc, the DMA buffer, opt3001 and
veml6031x00. None of them is a locking bug. Patch 9 enables the
analysis. The common and sensorhubs Makefiles only list subdirectories
and are left alone.
With the series applied all 726 files build without warnings, also
with W=1. bma180, ab8500-gpadc and intel_dc_ti_adc are not in
allmodconfig and were built on their own. gcc W=1 builds show no
warnings. Removing an unlock or a release is still reported, tried in
kx022a, ms5611 and veml6031x00.
Bart's thread-safety branch [3] has most of the same annotations. For
meson_saradc and the DMA buffer he uses __context_unsafe(). Here they
name the lock, so the helpers are checked, and for meson_saradc the
callers too.
Written with help from an LLM coding assistant.
v4: was a single qcom patch, now the first of nine
v3: https://lore.kernel.org/linux-iio/20261025191510.22261-1-zoone.rupert@gmail.com/
[1] https://lore.kernel.org/linux-iio/20261025215954.73549810@jic23-hlaptop/
[2] https://lore.kernel.org/linux-iio/76bbebb4-7337-486d-8f21-a39bcb6dca93@acm.org/
[3] https://github.com/bvanassche/linux/tree/thread-safety
Cc: Marco Elver <elver@google.com>
Cc: Bart Van Assche <bvanassche@acm.org>
Rupesh Majhi (9):
iio: adc: qcom-spmi-adc5-gen3: fix lock annotations on mutex helpers
iio: core: annotate the conditional mode claims
iio: core: mark the mode lock helpers __context_unsafe
iio: accel: kionix-kx022a: annotate the lock helpers
iio: adc: meson_saradc: annotate the lock helpers
iio: buffer-dma: annotate the queue lock helpers
iio: light: opt3001: mark the interrupt handler __context_unsafe
iio: light: veml6031x00: annotate the event enable helpers
iio: enable context analysis for all drivers
drivers/iio/Makefile | 2 ++
drivers/iio/accel/Makefile | 2 ++
drivers/iio/accel/kionix-kx022a.c | 2 ++
drivers/iio/adc/Makefile | 2 ++
drivers/iio/adc/meson_saradc.c | 2 ++
drivers/iio/adc/qcom-spmi-adc5-gen3.c | 4 ++--
drivers/iio/addac/Makefile | 2 ++
drivers/iio/afe/Makefile | 2 ++
drivers/iio/amplifiers/Makefile | 2 ++
drivers/iio/buffer/Makefile | 2 ++
drivers/iio/buffer/industrialio-buffer-dma.c | 2 ++
drivers/iio/cdc/Makefile | 2 ++
drivers/iio/chemical/Makefile | 2 ++
drivers/iio/common/cros_ec_sensors/Makefile | 2 ++
drivers/iio/common/hid-sensors/Makefile | 2 ++
drivers/iio/common/inv_sensors/Makefile | 2 ++
drivers/iio/common/ms_sensors/Makefile | 2 ++
drivers/iio/common/scmi_sensors/Makefile | 3 +++
drivers/iio/common/ssp_sensors/Makefile | 2 ++
drivers/iio/common/st_sensors/Makefile | 2 ++
drivers/iio/dac/Makefile | 2 ++
drivers/iio/dummy/Makefile | 2 ++
drivers/iio/filter/Makefile | 2 ++
drivers/iio/flow/Makefile | 2 ++
drivers/iio/frequency/Makefile | 2 ++
drivers/iio/gyro/Makefile | 2 ++
drivers/iio/health/Makefile | 2 ++
drivers/iio/humidity/Makefile | 2 ++
drivers/iio/imu/Makefile | 2 ++
drivers/iio/imu/bmi160/Makefile | 3 +++
drivers/iio/imu/bmi270/Makefile | 3 +++
drivers/iio/imu/bmi323/Makefile | 3 +++
drivers/iio/imu/bno055/Makefile | 2 ++
drivers/iio/imu/inv_icm42600/Makefile | 2 ++
drivers/iio/imu/inv_icm42607/Makefile | 2 ++
drivers/iio/imu/inv_icm45600/Makefile | 2 ++
drivers/iio/imu/inv_mpu6050/Makefile | 2 ++
drivers/iio/imu/smi330/Makefile | 3 +++
drivers/iio/imu/st_lsm6dsx/Makefile | 3 +++
drivers/iio/imu/st_lsm9ds0/Makefile | 3 +++
drivers/iio/industrialio-core.c | 2 ++
drivers/iio/light/Makefile | 2 ++
drivers/iio/light/opt3001.c | 1 +
drivers/iio/light/veml6031x00.c | 2 ++
drivers/iio/magnetometer/Makefile | 2 ++
drivers/iio/multiplexer/Makefile | 2 ++
drivers/iio/orientation/Makefile | 2 ++
drivers/iio/position/Makefile | 2 ++
drivers/iio/potentiometer/Makefile | 2 ++
drivers/iio/potentiostat/Makefile | 2 ++
drivers/iio/pressure/Makefile | 2 +-
drivers/iio/proximity/Makefile | 2 ++
drivers/iio/resolver/Makefile | 2 ++
drivers/iio/sensorhubs/osf/Makefile | 2 ++
drivers/iio/temperature/Makefile | 2 ++
drivers/iio/test/Makefile | 2 ++
drivers/iio/trigger/Makefile | 2 ++
include/linux/iio/iio.h | 9 ++-------
58 files changed, 121 insertions(+), 10 deletions(-)
base-commit: 7d80b4b383bc53b48abd3a30ca4a91cdab568bfa
--
2.43.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v4 1/9] iio: adc: qcom-spmi-adc5-gen3: fix lock annotations on mutex helpers
2026-10-27 12:49 [PATCH v4 0/9] iio: enable context analysis for all drivers Rupesh Majhi
@ 2026-10-27 12:49 ` Rupesh Majhi
2026-10-27 12:49 ` [PATCH v4 2/9] iio: core: annotate the conditional mode claims Rupesh Majhi
` (7 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Rupesh Majhi @ 2026-10-27 12:49 UTC (permalink / raw)
To: Alex Lanzano, Andy Shevchenko, Benson Leung, David Lechner,
Guenter Roeck, Jagath Jog J, Javier Carrasco,
Jean-Baptiste Maneyrol, Jerome Brunet, Jinseob Kim,
Jonathan Cameron, Kevin Hilman, Lorenzo Bianconi,
Martin Blumenstingl, Matti Vaittinen, Neil Armstrong,
Nuno Sá,
Remi Buisson
Cc: chrome-platform, linux-amlogic, linux-arm-kernel, linux-arm-msm,
linux-iio, linux-kernel, Rupesh Majhi, Bart Van Assche,
Marco Elver, Jishnu Prakash
Since commit 5b63d0ae94cc ("compiler-context-analysis: Remove Sparse
support"), __acquires() and __releases() only feed context analysis.
Their argument is parsed before the function body, where only dev is in
scope, so with analysis enabled for this file the build fails:
error: use of undeclared identifier 'adc'
Name the lock through dev, the same way the bodies find it. The analysis
then also checks that the helpers really take and drop it.
Suggested-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Rupesh Majhi <zoone.rupert@gmail.com>
---
Cc: Marco Elver <elver@google.com>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>
v4: name the lock through dev instead of __context_unsafe() (Bart),
now the first patch of the series that enables the analysis (Jonathan)
v3: drop Fixes tag (Jonathan), trailer cleanup (Andy)
https://lore.kernel.org/linux-iio/20261025191510.22261-1-zoone.rupert@gmail.com/
v2: __context_unsafe() explained in commit message (Andy)
https://lore.kernel.org/linux-iio/20261021052435.112686-1-zoone.rupert@gmail.com/
v1: https://lore.kernel.org/linux-iio/20261003214516.128573-1-zoone.rupert@gmail.com/
drivers/iio/adc/qcom-spmi-adc5-gen3.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/qcom-spmi-adc5-gen3.c b/drivers/iio/adc/qcom-spmi-adc5-gen3.c
index c68c6c5f6aca..09013c6e44a0 100644
--- a/drivers/iio/adc/qcom-spmi-adc5-gen3.c
+++ b/drivers/iio/adc/qcom-spmi-adc5-gen3.c
@@ -663,7 +663,7 @@ static int adc5_gen3_add_aux_tm_device(struct adc5_chip *adc)
}
void adc5_gen3_mutex_lock(struct device *dev)
- __acquires(&adc->lock)
+ __acquires(&((struct adc5_chip *)iio_priv(dev_get_drvdata(dev->parent)))->lock)
{
struct iio_dev *indio_dev = dev_get_drvdata(dev->parent);
struct adc5_chip *adc = iio_priv(indio_dev);
@@ -673,7 +673,7 @@ void adc5_gen3_mutex_lock(struct device *dev)
EXPORT_SYMBOL_NS_GPL(adc5_gen3_mutex_lock, "QCOM_SPMI_ADC5_GEN3");
void adc5_gen3_mutex_unlock(struct device *dev)
- __releases(&adc->lock)
+ __releases(&((struct adc5_chip *)iio_priv(dev_get_drvdata(dev->parent)))->lock)
{
struct iio_dev *indio_dev = dev_get_drvdata(dev->parent);
struct adc5_chip *adc = iio_priv(indio_dev);
--
2.43.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v4 2/9] iio: core: annotate the conditional mode claims
2026-10-27 12:49 [PATCH v4 0/9] iio: enable context analysis for all drivers Rupesh Majhi
2026-10-27 12:49 ` [PATCH v4 1/9] iio: adc: qcom-spmi-adc5-gen3: fix lock annotations on mutex helpers Rupesh Majhi
@ 2026-10-27 12:49 ` Rupesh Majhi
2026-10-27 12:49 ` [PATCH v4 3/9] iio: core: mark the mode lock helpers __context_unsafe Rupesh Majhi
` (6 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Rupesh Majhi @ 2026-10-27 12:49 UTC (permalink / raw)
To: Alex Lanzano, Andy Shevchenko, Benson Leung, David Lechner,
Guenter Roeck, Jagath Jog J, Javier Carrasco,
Jean-Baptiste Maneyrol, Jerome Brunet, Jinseob Kim,
Jonathan Cameron, Kevin Hilman, Lorenzo Bianconi,
Martin Blumenstingl, Matti Vaittinen, Neil Armstrong,
Nuno Sá,
Remi Buisson
Cc: chrome-platform, linux-amlogic, linux-arm-kernel, linux-arm-msm,
linux-iio, linux-kernel, Rupesh Majhi, Marco Elver,
Bart Van Assche
iio_device_claim_direct() and iio_device_try_claim_buffer_mode() hold
the mode lock only when they return true, but carry no annotation. With
context analysis on, each caller that releases the claim is reported
for releasing a lock it never took.
Mark both __cond_acquires(true, indio_dev), the token that
__iio_dev_mode_lock() acquires. Sparse no longer reads these
annotations, so drop the comment about it.
Signed-off-by: Rupesh Majhi <zoone.rupert@gmail.com>
---
Cc: Marco Elver <elver@google.com>
Cc: Bart Van Assche <bvanassche@acm.org>
include/linux/iio/iio.h | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index 9b63785d5aec..ca91f5a64626 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -707,13 +707,6 @@ 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);
-/*
- * 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 __acquires() and __releases() annotations.
- */
-
/**
* iio_device_claim_direct() - Keep device in direct mode
* @indio_dev: the iio_dev associated with the device
@@ -726,6 +719,7 @@ void __iio_dev_mode_unlock(struct iio_dev *indio_dev) __releases(indio_dev);
* Returns: true on success, false on failure.
*/
static inline bool iio_device_claim_direct(struct iio_dev *indio_dev)
+ __cond_acquires(true, indio_dev)
{
__iio_dev_mode_lock(indio_dev);
@@ -760,6 +754,7 @@ static inline bool iio_device_claim_direct(struct iio_dev *indio_dev)
* Returns: true on success, false on failure.
*/
static inline bool iio_device_try_claim_buffer_mode(struct iio_dev *indio_dev)
+ __cond_acquires(true, indio_dev)
{
__iio_dev_mode_lock(indio_dev);
--
2.43.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v4 3/9] iio: core: mark the mode lock helpers __context_unsafe
2026-10-27 12:49 [PATCH v4 0/9] iio: enable context analysis for all drivers Rupesh Majhi
2026-10-27 12:49 ` [PATCH v4 1/9] iio: adc: qcom-spmi-adc5-gen3: fix lock annotations on mutex helpers Rupesh Majhi
2026-10-27 12:49 ` [PATCH v4 2/9] iio: core: annotate the conditional mode claims Rupesh Majhi
@ 2026-10-27 12:49 ` Rupesh Majhi
2026-10-27 12:49 ` [PATCH v4 4/9] iio: accel: kionix-kx022a: annotate the lock helpers Rupesh Majhi
` (5 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Rupesh Majhi @ 2026-10-27 12:49 UTC (permalink / raw)
To: Alex Lanzano, Andy Shevchenko, Benson Leung, David Lechner,
Guenter Roeck, Jagath Jog J, Javier Carrasco,
Jean-Baptiste Maneyrol, Jerome Brunet, Jinseob Kim,
Jonathan Cameron, Kevin Hilman, Lorenzo Bianconi,
Martin Blumenstingl, Matti Vaittinen, Neil Armstrong,
Nuno Sá,
Remi Buisson
Cc: chrome-platform, linux-amlogic, linux-arm-kernel, linux-arm-msm,
linux-iio, linux-kernel, Rupesh Majhi, Marco Elver,
Bart Van Assche
__iio_dev_mode_lock() and __iio_dev_mode_unlock() are declared to take
and release indio_dev, a token for the mode lock, because the mutex
itself is private to the core. Their bodies take and release the mutex
instead, which context analysis reports once it is on for the core.
Mark both definitions __context_unsafe().
Signed-off-by: Rupesh Majhi <zoone.rupert@gmail.com>
---
Cc: Marco Elver <elver@google.com>
Cc: Bart Van Assche <bvanassche@acm.org>
drivers/iio/industrialio-core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index d73f2541375f..e9a5d1d905c1 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -2252,6 +2252,7 @@ EXPORT_SYMBOL_GPL(__devm_iio_device_register);
* iio_device_try_claim_buffer_mode() pairs or related helpers instead.
*/
void __iio_dev_mode_lock(struct iio_dev *indio_dev)
+ __context_unsafe(/* returns with mlock held */)
{
mutex_lock(&to_iio_dev_opaque(indio_dev)->mlock);
}
@@ -2262,6 +2263,7 @@ EXPORT_SYMBOL_GPL(__iio_dev_mode_lock);
* @indio_dev: the iio_dev associated with the device
*/
void __iio_dev_mode_unlock(struct iio_dev *indio_dev)
+ __context_unsafe(/* releases mlock */)
{
mutex_unlock(&to_iio_dev_opaque(indio_dev)->mlock);
}
--
2.43.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v4 4/9] iio: accel: kionix-kx022a: annotate the lock helpers
2026-10-27 12:49 [PATCH v4 0/9] iio: enable context analysis for all drivers Rupesh Majhi
` (2 preceding siblings ...)
2026-10-27 12:49 ` [PATCH v4 3/9] iio: core: mark the mode lock helpers __context_unsafe Rupesh Majhi
@ 2026-10-27 12:49 ` Rupesh Majhi
2026-10-27 12:49 ` [PATCH v4 5/9] iio: adc: meson_saradc: " Rupesh Majhi
` (4 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Rupesh Majhi @ 2026-10-27 12:49 UTC (permalink / raw)
To: Alex Lanzano, Andy Shevchenko, Benson Leung, David Lechner,
Guenter Roeck, Jagath Jog J, Javier Carrasco,
Jean-Baptiste Maneyrol, Jerome Brunet, Jinseob Kim,
Jonathan Cameron, Kevin Hilman, Lorenzo Bianconi,
Martin Blumenstingl, Matti Vaittinen, Neil Armstrong,
Nuno Sá,
Remi Buisson
Cc: chrome-platform, linux-amlogic, linux-arm-kernel, linux-arm-msm,
linux-iio, linux-kernel, Rupesh Majhi, Marco Elver,
Bart Van Assche
kx022a_turn_off_lock() returns with data->mutex held when it succeeds,
and kx022a_turn_on_unlock() releases it. Annotate both so context
analysis follows the lock into the callers.
Signed-off-by: Rupesh Majhi <zoone.rupert@gmail.com>
---
Cc: Marco Elver <elver@google.com>
Cc: Bart Van Assche <bvanassche@acm.org>
drivers/iio/accel/kionix-kx022a.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iio/accel/kionix-kx022a.c b/drivers/iio/accel/kionix-kx022a.c
index add89512af79..a132af87fb5e 100644
--- a/drivers/iio/accel/kionix-kx022a.c
+++ b/drivers/iio/accel/kionix-kx022a.c
@@ -484,6 +484,7 @@ static int __kx022a_turn_on_off(struct kx022a_data *data, bool on)
}
static int kx022a_turn_off_lock(struct kx022a_data *data)
+ __cond_acquires(0, &data->mutex)
{
int ret;
@@ -496,6 +497,7 @@ static int kx022a_turn_off_lock(struct kx022a_data *data)
}
static int kx022a_turn_on_unlock(struct kx022a_data *data)
+ __releases(&data->mutex)
{
int ret;
--
2.43.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v4 5/9] iio: adc: meson_saradc: annotate the lock helpers
2026-10-27 12:49 [PATCH v4 0/9] iio: enable context analysis for all drivers Rupesh Majhi
` (3 preceding siblings ...)
2026-10-27 12:49 ` [PATCH v4 4/9] iio: accel: kionix-kx022a: annotate the lock helpers Rupesh Majhi
@ 2026-10-27 12:49 ` Rupesh Majhi
2026-10-27 12:49 ` [PATCH v4 6/9] iio: buffer-dma: annotate the queue " Rupesh Majhi
` (3 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Rupesh Majhi @ 2026-10-27 12:49 UTC (permalink / raw)
To: Alex Lanzano, Andy Shevchenko, Benson Leung, David Lechner,
Guenter Roeck, Jagath Jog J, Javier Carrasco,
Jean-Baptiste Maneyrol, Jerome Brunet, Jinseob Kim,
Jonathan Cameron, Kevin Hilman, Lorenzo Bianconi,
Martin Blumenstingl, Matti Vaittinen, Neil Armstrong,
Nuno Sá,
Remi Buisson
Cc: chrome-platform, linux-amlogic, linux-arm-kernel, linux-arm-msm,
linux-iio, linux-kernel, Rupesh Majhi, Marco Elver,
Bart Van Assche
meson_sar_adc_lock() returns 0 with priv->lock held, and
meson_sar_adc_unlock() releases it. Annotate both so context analysis
follows the lock into the callers. Only indio_dev is in scope in the
annotation, so the lock is reached through iio_priv().
Signed-off-by: Rupesh Majhi <zoone.rupert@gmail.com>
---
Cc: Marco Elver <elver@google.com>
Cc: Bart Van Assche <bvanassche@acm.org>
drivers/iio/adc/meson_saradc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c
index 2b003fd5afeb..3c1bc2274129 100644
--- a/drivers/iio/adc/meson_saradc.c
+++ b/drivers/iio/adc/meson_saradc.c
@@ -578,6 +578,7 @@ static void meson_sar_adc_stop_sample_engine(struct iio_dev *indio_dev)
}
static int meson_sar_adc_lock(struct iio_dev *indio_dev)
+ __cond_acquires(0, &((struct meson_sar_adc_priv *)iio_priv(indio_dev))->lock)
{
struct meson_sar_adc_priv *priv = iio_priv(indio_dev);
int val, ret;
@@ -608,6 +609,7 @@ static int meson_sar_adc_lock(struct iio_dev *indio_dev)
}
static void meson_sar_adc_unlock(struct iio_dev *indio_dev)
+ __releases(&((struct meson_sar_adc_priv *)iio_priv(indio_dev))->lock)
{
struct meson_sar_adc_priv *priv = iio_priv(indio_dev);
--
2.43.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v4 6/9] iio: buffer-dma: annotate the queue lock helpers
2026-10-27 12:49 [PATCH v4 0/9] iio: enable context analysis for all drivers Rupesh Majhi
` (4 preceding siblings ...)
2026-10-27 12:49 ` [PATCH v4 5/9] iio: adc: meson_saradc: " Rupesh Majhi
@ 2026-10-27 12:49 ` Rupesh Majhi
2026-10-27 12:49 ` [PATCH v4 7/9] iio: light: opt3001: mark the interrupt handler __context_unsafe Rupesh Majhi
` (2 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Rupesh Majhi @ 2026-10-27 12:49 UTC (permalink / raw)
To: Alex Lanzano, Andy Shevchenko, Benson Leung, David Lechner,
Guenter Roeck, Jagath Jog J, Javier Carrasco,
Jean-Baptiste Maneyrol, Jerome Brunet, Jinseob Kim,
Jonathan Cameron, Kevin Hilman, Lorenzo Bianconi,
Martin Blumenstingl, Matti Vaittinen, Neil Armstrong,
Nuno Sá,
Remi Buisson
Cc: chrome-platform, linux-amlogic, linux-arm-kernel, linux-arm-msm,
linux-iio, linux-kernel, Rupesh Majhi, Marco Elver,
Bart Van Assche
iio_dma_buffer_lock_queue() and iio_dma_buffer_unlock_queue() take and
release the queue lock for the core. Annotate them with that lock so
context analysis checks them.
Signed-off-by: Rupesh Majhi <zoone.rupert@gmail.com>
---
Cc: Marco Elver <elver@google.com>
Cc: Bart Van Assche <bvanassche@acm.org>
drivers/iio/buffer/industrialio-buffer-dma.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iio/buffer/industrialio-buffer-dma.c b/drivers/iio/buffer/industrialio-buffer-dma.c
index 1daac23087a7..b42b70e9b06d 100644
--- a/drivers/iio/buffer/industrialio-buffer-dma.c
+++ b/drivers/iio/buffer/industrialio-buffer-dma.c
@@ -763,6 +763,7 @@ struct device *iio_dma_buffer_get_dma_dev(struct iio_buffer *buffer)
EXPORT_SYMBOL_NS_GPL(iio_dma_buffer_get_dma_dev, "IIO_DMA_BUFFER");
void iio_dma_buffer_lock_queue(struct iio_buffer *buffer)
+ __acquires(&iio_buffer_to_queue(buffer)->lock)
{
struct iio_dma_buffer_queue *queue = iio_buffer_to_queue(buffer);
@@ -771,6 +772,7 @@ void iio_dma_buffer_lock_queue(struct iio_buffer *buffer)
EXPORT_SYMBOL_NS_GPL(iio_dma_buffer_lock_queue, "IIO_DMA_BUFFER");
void iio_dma_buffer_unlock_queue(struct iio_buffer *buffer)
+ __releases(&iio_buffer_to_queue(buffer)->lock)
{
struct iio_dma_buffer_queue *queue = iio_buffer_to_queue(buffer);
--
2.43.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v4 7/9] iio: light: opt3001: mark the interrupt handler __context_unsafe
2026-10-27 12:49 [PATCH v4 0/9] iio: enable context analysis for all drivers Rupesh Majhi
` (5 preceding siblings ...)
2026-10-27 12:49 ` [PATCH v4 6/9] iio: buffer-dma: annotate the queue " Rupesh Majhi
@ 2026-10-27 12:49 ` Rupesh Majhi
2026-10-27 12:49 ` [PATCH v4 8/9] iio: light: veml6031x00: annotate the event enable helpers Rupesh Majhi
2026-10-27 12:49 ` [PATCH v4 9/9] iio: enable context analysis for all drivers Rupesh Majhi
8 siblings, 0 replies; 14+ messages in thread
From: Rupesh Majhi @ 2026-10-27 12:49 UTC (permalink / raw)
To: Alex Lanzano, Andy Shevchenko, Benson Leung, David Lechner,
Guenter Roeck, Jagath Jog J, Javier Carrasco,
Jean-Baptiste Maneyrol, Jerome Brunet, Jinseob Kim,
Jonathan Cameron, Kevin Hilman, Lorenzo Bianconi,
Martin Blumenstingl, Matti Vaittinen, Neil Armstrong,
Nuno Sá,
Remi Buisson
Cc: chrome-platform, linux-amlogic, linux-arm-kernel, linux-arm-msm,
linux-iio, linux-kernel, Rupesh Majhi, Marco Elver,
Bart Van Assche
opt3001_irq() takes opt->lock only when ok_to_ignore_lock is false, and
releases it under the same test. Context analysis does not follow a
lock taken and released on a condition, so mark the handler
__context_unsafe().
Signed-off-by: Rupesh Majhi <zoone.rupert@gmail.com>
---
Cc: Marco Elver <elver@google.com>
Cc: Bart Van Assche <bvanassche@acm.org>
drivers/iio/light/opt3001.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iio/light/opt3001.c b/drivers/iio/light/opt3001.c
index a948353014ac..cfd4a0ba9bd7 100644
--- a/drivers/iio/light/opt3001.c
+++ b/drivers/iio/light/opt3001.c
@@ -817,6 +817,7 @@ static int opt3001_configure(struct opt3001 *opt)
}
static irqreturn_t opt3001_irq(int irq, void *_iio)
+ __context_unsafe(/* lock only taken when !ok_to_ignore_lock */)
{
struct iio_dev *iio = _iio;
struct opt3001 *opt = iio_priv(iio);
--
2.43.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v4 8/9] iio: light: veml6031x00: annotate the event enable helpers
2026-10-27 12:49 [PATCH v4 0/9] iio: enable context analysis for all drivers Rupesh Majhi
` (6 preceding siblings ...)
2026-10-27 12:49 ` [PATCH v4 7/9] iio: light: opt3001: mark the interrupt handler __context_unsafe Rupesh Majhi
@ 2026-10-27 12:49 ` Rupesh Majhi
2026-10-27 16:52 ` Javier Carrasco
2026-10-27 12:49 ` [PATCH v4 9/9] iio: enable context analysis for all drivers Rupesh Majhi
8 siblings, 1 reply; 14+ messages in thread
From: Rupesh Majhi @ 2026-10-27 12:49 UTC (permalink / raw)
To: Alex Lanzano, Andy Shevchenko, Benson Leung, David Lechner,
Guenter Roeck, Jagath Jog J, Javier Carrasco,
Jean-Baptiste Maneyrol, Jerome Brunet, Jinseob Kim,
Jonathan Cameron, Kevin Hilman, Lorenzo Bianconi,
Martin Blumenstingl, Matti Vaittinen, Neil Armstrong,
Nuno Sá,
Remi Buisson
Cc: chrome-platform, linux-amlogic, linux-arm-kernel, linux-arm-msm,
linux-iio, linux-kernel, Rupesh Majhi, Marco Elver,
Bart Van Assche
veml6031x00_event_enable() and veml6031x00_event_disable() call
veml6031x00_set_interrupt(), which needs irq_lock held. Their only
caller holds it, so mark both __must_hold(&data->irq_lock).
Signed-off-by: Rupesh Majhi <zoone.rupert@gmail.com>
---
Cc: Marco Elver <elver@google.com>
Cc: Bart Van Assche <bvanassche@acm.org>
drivers/iio/light/veml6031x00.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iio/light/veml6031x00.c b/drivers/iio/light/veml6031x00.c
index f6308498e422..476ac3717f8e 100644
--- a/drivers/iio/light/veml6031x00.c
+++ b/drivers/iio/light/veml6031x00.c
@@ -784,6 +784,7 @@ static int veml6031x00_read_event_config(struct iio_dev *iio,
}
static int veml6031x00_event_enable(struct veml6031x00_data *data)
+ __must_hold(&data->irq_lock)
{
struct device *dev = regmap_get_device(data->regmap);
int ret;
@@ -804,6 +805,7 @@ static int veml6031x00_event_enable(struct veml6031x00_data *data)
}
static int veml6031x00_event_disable(struct veml6031x00_data *data)
+ __must_hold(&data->irq_lock)
{
struct device *dev = regmap_get_device(data->regmap);
int ret;
--
2.43.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v4 9/9] iio: enable context analysis for all drivers
2026-10-27 12:49 [PATCH v4 0/9] iio: enable context analysis for all drivers Rupesh Majhi
` (7 preceding siblings ...)
2026-10-27 12:49 ` [PATCH v4 8/9] iio: light: veml6031x00: annotate the event enable helpers Rupesh Majhi
@ 2026-10-27 12:49 ` Rupesh Majhi
2026-10-27 15:09 ` Kim Jinseob
2026-10-27 16:14 ` Andy Shevchenko
8 siblings, 2 replies; 14+ messages in thread
From: Rupesh Majhi @ 2026-10-27 12:49 UTC (permalink / raw)
To: Alex Lanzano, Andy Shevchenko, Benson Leung, David Lechner,
Guenter Roeck, Jagath Jog J, Javier Carrasco,
Jean-Baptiste Maneyrol, Jerome Brunet, Jinseob Kim,
Jonathan Cameron, Kevin Hilman, Lorenzo Bianconi,
Martin Blumenstingl, Matti Vaittinen, Neil Armstrong,
Nuno Sá,
Remi Buisson
Cc: chrome-platform, linux-amlogic, linux-arm-kernel, linux-arm-msm,
linux-iio, linux-kernel, Rupesh Majhi, Marco Elver,
Bart Van Assche
All of drivers/iio now builds without context analysis warnings, so
enable it in every Makefile that builds objects, replacing the entry
for dps310 alone.
Suggested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Rupesh Majhi <zoone.rupert@gmail.com>
---
Cc: Marco Elver <elver@google.com>
Cc: Bart Van Assche <bvanassche@acm.org>
drivers/iio/Makefile | 2 ++
drivers/iio/accel/Makefile | 2 ++
drivers/iio/adc/Makefile | 2 ++
drivers/iio/addac/Makefile | 2 ++
drivers/iio/afe/Makefile | 2 ++
drivers/iio/amplifiers/Makefile | 2 ++
drivers/iio/buffer/Makefile | 2 ++
drivers/iio/cdc/Makefile | 2 ++
drivers/iio/chemical/Makefile | 2 ++
drivers/iio/common/cros_ec_sensors/Makefile | 2 ++
drivers/iio/common/hid-sensors/Makefile | 2 ++
drivers/iio/common/inv_sensors/Makefile | 2 ++
drivers/iio/common/ms_sensors/Makefile | 2 ++
drivers/iio/common/scmi_sensors/Makefile | 3 +++
drivers/iio/common/ssp_sensors/Makefile | 2 ++
drivers/iio/common/st_sensors/Makefile | 2 ++
drivers/iio/dac/Makefile | 2 ++
drivers/iio/dummy/Makefile | 2 ++
drivers/iio/filter/Makefile | 2 ++
drivers/iio/flow/Makefile | 2 ++
drivers/iio/frequency/Makefile | 2 ++
drivers/iio/gyro/Makefile | 2 ++
drivers/iio/health/Makefile | 2 ++
drivers/iio/humidity/Makefile | 2 ++
drivers/iio/imu/Makefile | 2 ++
drivers/iio/imu/bmi160/Makefile | 3 +++
drivers/iio/imu/bmi270/Makefile | 3 +++
drivers/iio/imu/bmi323/Makefile | 3 +++
drivers/iio/imu/bno055/Makefile | 2 ++
drivers/iio/imu/inv_icm42600/Makefile | 2 ++
drivers/iio/imu/inv_icm42607/Makefile | 2 ++
drivers/iio/imu/inv_icm45600/Makefile | 2 ++
drivers/iio/imu/inv_mpu6050/Makefile | 2 ++
drivers/iio/imu/smi330/Makefile | 3 +++
drivers/iio/imu/st_lsm6dsx/Makefile | 3 +++
drivers/iio/imu/st_lsm9ds0/Makefile | 3 +++
drivers/iio/light/Makefile | 2 ++
drivers/iio/magnetometer/Makefile | 2 ++
drivers/iio/multiplexer/Makefile | 2 ++
drivers/iio/orientation/Makefile | 2 ++
drivers/iio/position/Makefile | 2 ++
drivers/iio/potentiometer/Makefile | 2 ++
drivers/iio/potentiostat/Makefile | 2 ++
drivers/iio/pressure/Makefile | 2 +-
drivers/iio/proximity/Makefile | 2 ++
drivers/iio/resolver/Makefile | 2 ++
drivers/iio/sensorhubs/osf/Makefile | 2 ++
drivers/iio/temperature/Makefile | 2 ++
drivers/iio/test/Makefile | 2 ++
drivers/iio/trigger/Makefile | 2 ++
50 files changed, 106 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/Makefile b/drivers/iio/Makefile
index 4e1d930108de..7aead0b09cc6 100644
--- a/drivers/iio/Makefile
+++ b/drivers/iio/Makefile
@@ -3,6 +3,8 @@
# Makefile for the industrial I/O core.
#
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_IIO) += industrialio.o
industrialio-y := industrialio-core.o industrialio-event.o inkern.o
industrialio-$(CONFIG_IIO_BUFFER) += industrialio-buffer.o
diff --git a/drivers/iio/accel/Makefile b/drivers/iio/accel/Makefile
index fa440a859283..ec75ab67bd45 100644
--- a/drivers/iio/accel/Makefile
+++ b/drivers/iio/accel/Makefile
@@ -3,6 +3,8 @@
# Makefile for industrial I/O accelerometer drivers
#
+CONTEXT_ANALYSIS := y
+
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_ADIS16201) += adis16201.o
obj-$(CONFIG_ADIS16209) += adis16209.o
diff --git a/drivers/iio/adc/Makefile b/drivers/iio/adc/Makefile
index d7bb4815df61..15ac57dc2054 100644
--- a/drivers/iio/adc/Makefile
+++ b/drivers/iio/adc/Makefile
@@ -3,6 +3,8 @@
# Makefile for IIO ADC drivers
#
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_IIO_ADC_HELPER) += industrialio-adc.o
# When adding new entries keep the list in alphabetical order
diff --git a/drivers/iio/addac/Makefile b/drivers/iio/addac/Makefile
index 577777276e43..ca0c5d341627 100644
--- a/drivers/iio/addac/Makefile
+++ b/drivers/iio/addac/Makefile
@@ -3,6 +3,8 @@
# Makefile for industrial I/O ADDAC drivers
#
+CONTEXT_ANALYSIS := y
+
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_AD74115) += ad74115.o
obj-$(CONFIG_AD74413R) += ad74413r.o
diff --git a/drivers/iio/afe/Makefile b/drivers/iio/afe/Makefile
index 4c56c8edb2ba..453f1fc7f647 100644
--- a/drivers/iio/afe/Makefile
+++ b/drivers/iio/afe/Makefile
@@ -3,5 +3,7 @@
# Makefile for industrial I/O Analog Front Ends (AFE)
#
+CONTEXT_ANALYSIS := y
+
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_IIO_RESCALE) += iio-rescale.o
diff --git a/drivers/iio/amplifiers/Makefile b/drivers/iio/amplifiers/Makefile
index 0a76443be1aa..d7c5036ba2df 100644
--- a/drivers/iio/amplifiers/Makefile
+++ b/drivers/iio/amplifiers/Makefile
@@ -3,6 +3,8 @@
# Makefile iio/amplifiers
#
+CONTEXT_ANALYSIS := y
+
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_AD8366) += ad8366.o
obj-$(CONFIG_ADA4250) += ada4250.o
diff --git a/drivers/iio/buffer/Makefile b/drivers/iio/buffer/Makefile
index 1403eb2f9409..bb068efa4c9d 100644
--- a/drivers/iio/buffer/Makefile
+++ b/drivers/iio/buffer/Makefile
@@ -3,6 +3,8 @@
# Makefile for the industrial I/O buffer implementations
#
+CONTEXT_ANALYSIS := y
+
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_IIO_BUFFER_CB) += industrialio-buffer-cb.o
obj-$(CONFIG_IIO_BUFFER_DMA) += industrialio-buffer-dma.o
diff --git a/drivers/iio/cdc/Makefile b/drivers/iio/cdc/Makefile
index 41db756d8020..241263f7b512 100644
--- a/drivers/iio/cdc/Makefile
+++ b/drivers/iio/cdc/Makefile
@@ -3,5 +3,7 @@
# Makefile for industrial I/O capacitance to digital converter (CDC) drivers
#
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_AD7150) += ad7150.o
obj-$(CONFIG_AD7746) += ad7746.o
diff --git a/drivers/iio/chemical/Makefile b/drivers/iio/chemical/Makefile
index 2287a00a6b75..0cffbad02234 100644
--- a/drivers/iio/chemical/Makefile
+++ b/drivers/iio/chemical/Makefile
@@ -3,6 +3,8 @@
# Makefile for IIO chemical sensors
#
+CONTEXT_ANALYSIS := y
+
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_AOSONG_AGS02MA) += ags02ma.o
obj-$(CONFIG_ATLAS_PH_SENSOR) += atlas-sensor.o
diff --git a/drivers/iio/common/cros_ec_sensors/Makefile b/drivers/iio/common/cros_ec_sensors/Makefile
index a7dfb5794cae..5c41c7e52d0c 100644
--- a/drivers/iio/common/cros_ec_sensors/Makefile
+++ b/drivers/iio/common/cros_ec_sensors/Makefile
@@ -3,6 +3,8 @@
# Makefile for sensors seen through the ChromeOS EC sensor hub.
#
+CONTEXT_ANALYSIS := y
+
cros-ec-sensors-core-objs += cros_ec_sensors_core.o cros_ec_sensors_trace.o
obj-$(CONFIG_IIO_CROS_EC_SENSORS_CORE) += cros-ec-sensors-core.o
obj-$(CONFIG_IIO_CROS_EC_SENSORS) += cros_ec_sensors.o
diff --git a/drivers/iio/common/hid-sensors/Makefile b/drivers/iio/common/hid-sensors/Makefile
index 64b01a81fcb2..b90bcf40066a 100644
--- a/drivers/iio/common/hid-sensors/Makefile
+++ b/drivers/iio/common/hid-sensors/Makefile
@@ -3,6 +3,8 @@
# Makefile for the Hid sensor common modules.
#
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_HID_SENSOR_IIO_COMMON) += hid-sensor-iio-common.o
obj-$(CONFIG_HID_SENSOR_IIO_TRIGGER) += hid-sensor-trigger.o
hid-sensor-iio-common-y := hid-sensor-attributes.o
diff --git a/drivers/iio/common/inv_sensors/Makefile b/drivers/iio/common/inv_sensors/Makefile
index dcf39f249112..a464dad84d68 100644
--- a/drivers/iio/common/inv_sensors/Makefile
+++ b/drivers/iio/common/inv_sensors/Makefile
@@ -3,4 +3,6 @@
# Makefile for TDK-InvenSense sensors module.
#
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_IIO_INV_SENSORS_TIMESTAMP) += inv_sensors_timestamp.o
diff --git a/drivers/iio/common/ms_sensors/Makefile b/drivers/iio/common/ms_sensors/Makefile
index 028573b9b7e3..8f9b9a4556e8 100644
--- a/drivers/iio/common/ms_sensors/Makefile
+++ b/drivers/iio/common/ms_sensors/Makefile
@@ -3,4 +3,6 @@
# Makefile for the Measurement Specialties sensor common modules.
#
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_IIO_MS_SENSORS_I2C) += ms_sensors_i2c.o
diff --git a/drivers/iio/common/scmi_sensors/Makefile b/drivers/iio/common/scmi_sensors/Makefile
index 645e0fce1a73..4c1421003d2d 100644
--- a/drivers/iio/common/scmi_sensors/Makefile
+++ b/drivers/iio/common/scmi_sensors/Makefile
@@ -2,4 +2,7 @@
#
# Makefile for the IIO over SCMI
#
+
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_IIO_SCMI) += scmi_iio.o
diff --git a/drivers/iio/common/ssp_sensors/Makefile b/drivers/iio/common/ssp_sensors/Makefile
index ba831429b20a..caee484a0a23 100644
--- a/drivers/iio/common/ssp_sensors/Makefile
+++ b/drivers/iio/common/ssp_sensors/Makefile
@@ -3,6 +3,8 @@
# Makefile for SSP sensor drivers and commons.
#
+CONTEXT_ANALYSIS := y
+
sensorhub-objs := ssp_dev.o ssp_spi.o
obj-$(CONFIG_IIO_SSP_SENSORHUB) += sensorhub.o
diff --git a/drivers/iio/common/st_sensors/Makefile b/drivers/iio/common/st_sensors/Makefile
index f7fb3b79b64c..089f6aca57b7 100644
--- a/drivers/iio/common/st_sensors/Makefile
+++ b/drivers/iio/common/st_sensors/Makefile
@@ -3,6 +3,8 @@
# Makefile for the STMicroelectronics sensor common modules.
#
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_IIO_ST_SENSORS_I2C) += st_sensors_i2c.o
obj-$(CONFIG_IIO_ST_SENSORS_SPI) += st_sensors_spi.o
obj-$(CONFIG_IIO_ST_SENSORS_CORE) += st_sensors.o
diff --git a/drivers/iio/dac/Makefile b/drivers/iio/dac/Makefile
index 2cd0fe23db9e..72da690354e5 100644
--- a/drivers/iio/dac/Makefile
+++ b/drivers/iio/dac/Makefile
@@ -3,6 +3,8 @@
# Makefile for industrial I/O DAC drivers
#
+CONTEXT_ANALYSIS := y
+
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_AD3530R) += ad3530r.o
obj-$(CONFIG_AD3552R_HS) += ad3552r-hs.o
diff --git a/drivers/iio/dummy/Makefile b/drivers/iio/dummy/Makefile
index f14fe20f365c..aa3949ec2619 100644
--- a/drivers/iio/dummy/Makefile
+++ b/drivers/iio/dummy/Makefile
@@ -3,6 +3,8 @@
# Makefile for the IIO Dummy Driver
#
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_IIO_SIMPLE_DUMMY) += iio_dummy.o
iio_dummy-y := iio_simple_dummy.o
iio_dummy-$(CONFIG_IIO_SIMPLE_DUMMY_EVENTS) += iio_simple_dummy_events.o
diff --git a/drivers/iio/filter/Makefile b/drivers/iio/filter/Makefile
index 55e228c0dd20..ec416d647755 100644
--- a/drivers/iio/filter/Makefile
+++ b/drivers/iio/filter/Makefile
@@ -3,5 +3,7 @@
# Makefile for industrial I/O Filter drivers
#
+CONTEXT_ANALYSIS := y
+
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_ADMV8818) += admv8818.o
diff --git a/drivers/iio/flow/Makefile b/drivers/iio/flow/Makefile
index 3cf4ab95c69c..ce5e1df630a9 100644
--- a/drivers/iio/flow/Makefile
+++ b/drivers/iio/flow/Makefile
@@ -3,5 +3,7 @@
# Makefile for industrial I/O flow sensor drivers
#
+CONTEXT_ANALYSIS := y
+
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_SENSIRION_SLF3S) += slf3s.o
diff --git a/drivers/iio/frequency/Makefile b/drivers/iio/frequency/Makefile
index e3b1d36ed620..5f9900a4ebf3 100644
--- a/drivers/iio/frequency/Makefile
+++ b/drivers/iio/frequency/Makefile
@@ -3,6 +3,8 @@
# Makefile iio/frequency
#
+CONTEXT_ANALYSIS := y
+
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_AD9523) += ad9523.o
obj-$(CONFIG_AD9910) += ad9910.o
diff --git a/drivers/iio/gyro/Makefile b/drivers/iio/gyro/Makefile
index 0319b397dc3f..1c2a020ffe6e 100644
--- a/drivers/iio/gyro/Makefile
+++ b/drivers/iio/gyro/Makefile
@@ -3,6 +3,8 @@
# Makefile for industrial I/O gyroscope sensor drivers
#
+CONTEXT_ANALYSIS := y
+
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_ADIS16080) += adis16080.o
obj-$(CONFIG_ADIS16130) += adis16130.o
diff --git a/drivers/iio/health/Makefile b/drivers/iio/health/Makefile
index 910817112258..9100aa431585 100644
--- a/drivers/iio/health/Makefile
+++ b/drivers/iio/health/Makefile
@@ -3,6 +3,8 @@
# Makefile for IIO Health sensors
#
+CONTEXT_ANALYSIS := y
+
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_AFE4403) += afe4403.o
diff --git a/drivers/iio/humidity/Makefile b/drivers/iio/humidity/Makefile
index 34b3dc749466..1d736b306a8d 100644
--- a/drivers/iio/humidity/Makefile
+++ b/drivers/iio/humidity/Makefile
@@ -3,6 +3,8 @@
# Makefile for IIO humidity sensor drivers
#
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_AM2315) += am2315.o
obj-$(CONFIG_DHT11) += dht11.o
obj-$(CONFIG_ENS210) += ens210.o
diff --git a/drivers/iio/imu/Makefile b/drivers/iio/imu/Makefile
index 3268dc2371ae..10383f75d288 100644
--- a/drivers/iio/imu/Makefile
+++ b/drivers/iio/imu/Makefile
@@ -3,6 +3,8 @@
# Makefile for Inertial Measurement Units
#
+CONTEXT_ANALYSIS := y
+
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_ADIS16400) += adis16400.o
obj-$(CONFIG_ADIS16460) += adis16460.o
diff --git a/drivers/iio/imu/bmi160/Makefile b/drivers/iio/imu/bmi160/Makefile
index fdcfeddf48d4..72ebe0409d92 100644
--- a/drivers/iio/imu/bmi160/Makefile
+++ b/drivers/iio/imu/bmi160/Makefile
@@ -2,6 +2,9 @@
#
# Makefile for Bosch BMI160 IMU
#
+
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_BMI160) += bmi160_core.o
obj-$(CONFIG_BMI160_I2C) += bmi160_i2c.o
obj-$(CONFIG_BMI160_SPI) += bmi160_spi.o
diff --git a/drivers/iio/imu/bmi270/Makefile b/drivers/iio/imu/bmi270/Makefile
index d96c96fc3d83..1dc327c96f8f 100644
--- a/drivers/iio/imu/bmi270/Makefile
+++ b/drivers/iio/imu/bmi270/Makefile
@@ -2,6 +2,9 @@
#
# Makefile for Bosch BMI270 IMU
#
+
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_BMI270) += bmi270_core.o
obj-$(CONFIG_BMI270_I2C) += bmi270_i2c.o
obj-$(CONFIG_BMI270_SPI) += bmi270_spi.o
diff --git a/drivers/iio/imu/bmi323/Makefile b/drivers/iio/imu/bmi323/Makefile
index a6a6dc0207c9..ef8fc4f8460c 100644
--- a/drivers/iio/imu/bmi323/Makefile
+++ b/drivers/iio/imu/bmi323/Makefile
@@ -2,6 +2,9 @@
#
# Makefile for Bosch BMI323 IMU
#
+
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_BMI323) += bmi323_core.o
obj-$(CONFIG_BMI323_I2C) += bmi323_i2c.o
obj-$(CONFIG_BMI323_SPI) += bmi323_spi.o
diff --git a/drivers/iio/imu/bno055/Makefile b/drivers/iio/imu/bno055/Makefile
index 98c624730dae..8ecf24be7954 100644
--- a/drivers/iio/imu/bno055/Makefile
+++ b/drivers/iio/imu/bno055/Makefile
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_BOSCH_BNO055) += bno055.o
obj-$(CONFIG_BOSCH_BNO055_SERIAL) += bno055_ser.o
bno055_ser-y := bno055_ser_core.o
diff --git a/drivers/iio/imu/inv_icm42600/Makefile b/drivers/iio/imu/inv_icm42600/Makefile
index 0f49f6df3647..9b6ddbce713d 100644
--- a/drivers/iio/imu/inv_icm42600/Makefile
+++ b/drivers/iio/imu/inv_icm42600/Makefile
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_INV_ICM42600) += inv-icm42600.o
inv-icm42600-y += inv_icm42600_core.o
inv-icm42600-y += inv_icm42600_gyro.o
diff --git a/drivers/iio/imu/inv_icm42607/Makefile b/drivers/iio/imu/inv_icm42607/Makefile
index 7b907e019601..4f19ebe08f88 100644
--- a/drivers/iio/imu/inv_icm42607/Makefile
+++ b/drivers/iio/imu/inv_icm42607/Makefile
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_INV_ICM42607) += inv-icm42607.o
inv-icm42607-y += inv_icm42607_core.o
inv-icm42607-y += inv_icm42607_gyro.o
diff --git a/drivers/iio/imu/inv_icm45600/Makefile b/drivers/iio/imu/inv_icm45600/Makefile
index c98b8365b467..b5aaa00ba3b3 100644
--- a/drivers/iio/imu/inv_icm45600/Makefile
+++ b/drivers/iio/imu/inv_icm45600/Makefile
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_INV_ICM45600) += inv-icm45600.o
inv-icm45600-y += inv_icm45600_core.o
inv-icm45600-y += inv_icm45600_buffer.o
diff --git a/drivers/iio/imu/inv_mpu6050/Makefile b/drivers/iio/imu/inv_mpu6050/Makefile
index c103441a906b..7c89414e1452 100644
--- a/drivers/iio/imu/inv_mpu6050/Makefile
+++ b/drivers/iio/imu/inv_mpu6050/Makefile
@@ -3,6 +3,8 @@
# Makefile for Invensense MPU6050 device.
#
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_INV_MPU6050_IIO) += inv-mpu6050.o
inv-mpu6050-y := inv_mpu_core.o inv_mpu_ring.o inv_mpu_trigger.o \
inv_mpu_aux.o inv_mpu_magn.o
diff --git a/drivers/iio/imu/smi330/Makefile b/drivers/iio/imu/smi330/Makefile
index c663dcb5a9f2..90e0977133e9 100644
--- a/drivers/iio/imu/smi330/Makefile
+++ b/drivers/iio/imu/smi330/Makefile
@@ -2,6 +2,9 @@
#
# Makefile for Bosch SMI330 IMU
#
+
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_SMI330) += smi330_core.o
obj-$(CONFIG_SMI330_I2C) += smi330_i2c.o
obj-$(CONFIG_SMI330_SPI) += smi330_spi.o
diff --git a/drivers/iio/imu/st_lsm6dsx/Makefile b/drivers/iio/imu/st_lsm6dsx/Makefile
index 19a488254de3..11b8ab9adac2 100644
--- a/drivers/iio/imu/st_lsm6dsx/Makefile
+++ b/drivers/iio/imu/st_lsm6dsx/Makefile
@@ -1,4 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only
+
+CONTEXT_ANALYSIS := y
+
st_lsm6dsx-y := st_lsm6dsx_core.o st_lsm6dsx_buffer.o \
st_lsm6dsx_shub.o st_lsm6dsx_fusion.o
diff --git a/drivers/iio/imu/st_lsm9ds0/Makefile b/drivers/iio/imu/st_lsm9ds0/Makefile
index 488af523f648..6326718f7e25 100644
--- a/drivers/iio/imu/st_lsm9ds0/Makefile
+++ b/drivers/iio/imu/st_lsm9ds0/Makefile
@@ -1,4 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only
+
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_IIO_ST_LSM9DS0) += st_lsm9ds0.o
st_lsm9ds0-y := st_lsm9ds0_core.o
obj-$(CONFIG_IIO_ST_LSM9DS0_I2C) += st_lsm9ds0_i2c.o
diff --git a/drivers/iio/light/Makefile b/drivers/iio/light/Makefile
index 6672ed01a819..5db5ab99f63f 100644
--- a/drivers/iio/light/Makefile
+++ b/drivers/iio/light/Makefile
@@ -3,6 +3,8 @@
# Makefile for IIO Light sensors
#
+CONTEXT_ANALYSIS := y
+
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_ACPI_ALS) += acpi-als.o
obj-$(CONFIG_ADJD_S311) += adjd_s311.o
diff --git a/drivers/iio/magnetometer/Makefile b/drivers/iio/magnetometer/Makefile
index 8f2205975c1b..b85de8718ce4 100644
--- a/drivers/iio/magnetometer/Makefile
+++ b/drivers/iio/magnetometer/Makefile
@@ -3,6 +3,8 @@
# Makefile for industrial I/O Magnetometer sensor drivers
#
+CONTEXT_ANALYSIS := y
+
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_AF8133J) += af8133j.o
obj-$(CONFIG_AK8974) += ak8974.o
diff --git a/drivers/iio/multiplexer/Makefile b/drivers/iio/multiplexer/Makefile
index f069ab781d95..7a2261b2f8b1 100644
--- a/drivers/iio/multiplexer/Makefile
+++ b/drivers/iio/multiplexer/Makefile
@@ -3,5 +3,7 @@
# Makefile for industrial I/O multiplexer drivers
#
+CONTEXT_ANALYSIS := y
+
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_IIO_MUX) += iio-mux.o
diff --git a/drivers/iio/orientation/Makefile b/drivers/iio/orientation/Makefile
index 7800ed293a9a..3bfa01d483da 100644
--- a/drivers/iio/orientation/Makefile
+++ b/drivers/iio/orientation/Makefile
@@ -3,6 +3,8 @@
# Makefile for industrial I/O Inclinometer sensor drivers
#
+CONTEXT_ANALYSIS := y
+
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_HID_SENSOR_INCLINOMETER_3D) += hid-sensor-incl-3d.o
obj-$(CONFIG_HID_SENSOR_DEVICE_ROTATION) += hid-sensor-rotation.o
diff --git a/drivers/iio/position/Makefile b/drivers/iio/position/Makefile
index d70902f2979d..0b61f33bbee8 100644
--- a/drivers/iio/position/Makefile
+++ b/drivers/iio/position/Makefile
@@ -2,6 +2,8 @@
# Makefile for IIO linear and angular position sensors
#
+CONTEXT_ANALYSIS := y
+
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_HID_SENSOR_CUSTOM_INTEL_HINGE) += hid-sensor-custom-intel-hinge.o
diff --git a/drivers/iio/potentiometer/Makefile b/drivers/iio/potentiometer/Makefile
index d11fb739176c..5cf55d9501c0 100644
--- a/drivers/iio/potentiometer/Makefile
+++ b/drivers/iio/potentiometer/Makefile
@@ -3,6 +3,8 @@
# Makefile for industrial I/O potentiometer drivers
#
+CONTEXT_ANALYSIS := y
+
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_AD5110) += ad5110.o
obj-$(CONFIG_AD5272) += ad5272.o
diff --git a/drivers/iio/potentiostat/Makefile b/drivers/iio/potentiostat/Makefile
index be78b46acbab..a3e5d78cf809 100644
--- a/drivers/iio/potentiostat/Makefile
+++ b/drivers/iio/potentiostat/Makefile
@@ -3,5 +3,7 @@
# Makefile for industrial I/O potentiostat drivers
#
+CONTEXT_ANALYSIS := y
+
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_LMP91000) += lmp91000.o
diff --git a/drivers/iio/pressure/Makefile b/drivers/iio/pressure/Makefile
index a3b57bdd5b3e..861f5622a44f 100644
--- a/drivers/iio/pressure/Makefile
+++ b/drivers/iio/pressure/Makefile
@@ -3,7 +3,7 @@
# Makefile for industrial I/O pressure drivers
#
-CONTEXT_ANALYSIS_dps310.o := y
+CONTEXT_ANALYSIS := y
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_ABP060MG) += abp060mg.o
diff --git a/drivers/iio/proximity/Makefile b/drivers/iio/proximity/Makefile
index 8a65e42fbea0..88b19778252b 100644
--- a/drivers/iio/proximity/Makefile
+++ b/drivers/iio/proximity/Makefile
@@ -3,6 +3,8 @@
# Makefile for IIO proximity sensors
#
+CONTEXT_ANALYSIS := y
+
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_AS3935) += as3935.o
obj-$(CONFIG_CROS_EC_MKBP_PROXIMITY) += cros_ec_mkbp_proximity.o
diff --git a/drivers/iio/resolver/Makefile b/drivers/iio/resolver/Makefile
index 7f6c876c35ae..28aeef65fb6d 100644
--- a/drivers/iio/resolver/Makefile
+++ b/drivers/iio/resolver/Makefile
@@ -3,6 +3,8 @@
# Makefile for Resolver/Synchro drivers
#
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_AD2S90) += ad2s90.o
obj-$(CONFIG_AD2S1200) += ad2s1200.o
obj-$(CONFIG_AD2S1210) += ad2s1210.o
diff --git a/drivers/iio/sensorhubs/osf/Makefile b/drivers/iio/sensorhubs/osf/Makefile
index b4e03b80cfa4..da98e9b27577 100644
--- a/drivers/iio/sensorhubs/osf/Makefile
+++ b/drivers/iio/sensorhubs/osf/Makefile
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_OPEN_SENSOR_FUSION) += open-sensor-fusion.o
open-sensor-fusion-y := osf_core.o osf_iio.o osf_protocol.o osf_serdev.o \
diff --git a/drivers/iio/temperature/Makefile b/drivers/iio/temperature/Makefile
index 0850bf691820..69a084f0a18a 100644
--- a/drivers/iio/temperature/Makefile
+++ b/drivers/iio/temperature/Makefile
@@ -3,6 +3,8 @@
# Makefile for industrial I/O temperature drivers
#
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_IQS620AT_TEMP) += iqs620at-temp.o
obj-$(CONFIG_LTC2983) += ltc2983.o
obj-$(CONFIG_HID_SENSOR_TEMP) += hid-sensor-temperature.o
diff --git a/drivers/iio/test/Makefile b/drivers/iio/test/Makefile
index ba08afa7f3f2..a7222f878a94 100644
--- a/drivers/iio/test/Makefile
+++ b/drivers/iio/test/Makefile
@@ -3,6 +3,8 @@
# Makefile for the industrial I/O unit tests.
#
+CONTEXT_ANALYSIS := y
+
# Keep in alphabetical order
obj-$(CONFIG_IIO_CHANNEL_PREFIX_KUNIT_TEST) += iio-test-channel-prefix.o
obj-$(CONFIG_IIO_RESCALE_KUNIT_TEST) += iio-test-rescale.o
diff --git a/drivers/iio/trigger/Makefile b/drivers/iio/trigger/Makefile
index fc1fd5661c94..6eb16f37df15 100644
--- a/drivers/iio/trigger/Makefile
+++ b/drivers/iio/trigger/Makefile
@@ -3,6 +3,8 @@
# Makefile for triggers not associated with iio-devices
#
+CONTEXT_ANALYSIS := y
+
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_IIO_HRTIMER_TRIGGER) += iio-trig-hrtimer.o
--
2.43.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 9/9] iio: enable context analysis for all drivers
2026-10-27 12:49 ` [PATCH v4 9/9] iio: enable context analysis for all drivers Rupesh Majhi
@ 2026-10-27 15:09 ` Kim Jinseob
2026-10-27 16:14 ` Andy Shevchenko
1 sibling, 0 replies; 14+ messages in thread
From: Kim Jinseob @ 2026-10-27 15:09 UTC (permalink / raw)
To: Rupesh Majhi
Cc: Alex Lanzano, Andy Shevchenko, Benson Leung, David Lechner,
Guenter Roeck, Jagath Jog J, Javier Carrasco,
Jean-Baptiste Maneyrol, Jerome Brunet, Jonathan Cameron,
Kevin Hilman, Lorenzo Bianconi, Martin Blumenstingl,
Matti Vaittinen, Neil Armstrong, Nuno Sá,
Remi Buisson, chrome-platform, linux-amlogic, linux-arm-kernel,
linux-arm-msm, linux-iio, linux-kernel, Marco Elver,
Bart Van Assche
I independently build-tested the full v4 series (1/9 through 9/9) on
top of jic23/iio.git testing at 7d80b4b383bc, using Clang 24.0.0git
with context analysis enabled and W=1.
Results:
- x86_64 OSF: 5/5 translation units built, 0 warnings/errors.
- ARM64 OSF: 5/5 translation units built, 0 warnings/errors.
- x86_64 allmodconfig-based IIO: 723/723 selected translation units
built, 0 warnings/errors.
As a control, enabling context analysis with 9/9 alone reproduced 256
warnings and 2 errors. Applying the complete series eliminated these
diagnostics, including an OSF warning resolved by the conditional mode
claim annotation in 2/9.
Testing covered compilation and static context analysis only. Final
module linking, module loading and runtime/hardware testing were not
performed.
Tested-by: Jinseob Kim kimjinseob88@gmail.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 9/9] iio: enable context analysis for all drivers
2026-10-27 12:49 ` [PATCH v4 9/9] iio: enable context analysis for all drivers Rupesh Majhi
2026-10-27 15:09 ` Kim Jinseob
@ 2026-10-27 16:14 ` Andy Shevchenko
2026-10-27 17:21 ` Marco Elver
1 sibling, 1 reply; 14+ messages in thread
From: Andy Shevchenko @ 2026-10-27 16:14 UTC (permalink / raw)
To: Rupesh Majhi
Cc: Alex Lanzano, Andy Shevchenko, Benson Leung, David Lechner,
Guenter Roeck, Jagath Jog J, Javier Carrasco,
Jean-Baptiste Maneyrol, Jerome Brunet, Jinseob Kim,
Jonathan Cameron, Kevin Hilman, Lorenzo Bianconi,
Martin Blumenstingl, Matti Vaittinen, Neil Armstrong,
Nuno Sá,
Remi Buisson, chrome-platform, linux-amlogic, linux-arm-kernel,
linux-arm-msm, linux-iio, linux-kernel, Marco Elver,
Bart Van Assche
On Tue, Oct 27, 2026 at 02:49:54PM +0200, Rupesh Majhi wrote:
> All of drivers/iio now builds without context analysis warnings, so
> enable it in every Makefile that builds objects, replacing the entry
> for dps310 alone.
...
> +++ b/drivers/iio/Makefile
> +CONTEXT_ANALYSIS := y
Can we reduce the churn to only adding it here and do some magic to propagate
this recursively, please? I truly believe it's feasible to achieve.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 8/9] iio: light: veml6031x00: annotate the event enable helpers
2026-10-27 12:49 ` [PATCH v4 8/9] iio: light: veml6031x00: annotate the event enable helpers Rupesh Majhi
@ 2026-10-27 16:52 ` Javier Carrasco
0 siblings, 0 replies; 14+ messages in thread
From: Javier Carrasco @ 2026-10-27 16:52 UTC (permalink / raw)
To: Rupesh Majhi, Alex Lanzano, Andy Shevchenko, Benson Leung,
David Lechner, Guenter Roeck, Jagath Jog J, Javier Carrasco,
Jean-Baptiste Maneyrol, Jerome Brunet, Jinseob Kim,
Jonathan Cameron, Kevin Hilman, Lorenzo Bianconi,
Martin Blumenstingl, Matti Vaittinen, Neil Armstrong,
Nuno Sá,
Remi Buisson
Cc: chrome-platform, linux-amlogic, linux-arm-kernel, linux-arm-msm,
linux-iio, linux-kernel, Marco Elver, Bart Van Assche
On Tue Oct 27, 2026 at 7:49 AM EST, Rupesh Majhi wrote:
> veml6031x00_event_enable() and veml6031x00_event_disable() call
> veml6031x00_set_interrupt(), which needs irq_lock held. Their only
> caller holds it, so mark both __must_hold(&data->irq_lock).
>
> Signed-off-by: Rupesh Majhi <zoone.rupert@gmail.com>
> ---
> Cc: Marco Elver <elver@google.com>
> Cc: Bart Van Assche <bvanassche@acm.org>
>
> drivers/iio/light/veml6031x00.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/iio/light/veml6031x00.c b/drivers/iio/light/veml6031x00.c
> index f6308498e422..476ac3717f8e 100644
> --- a/drivers/iio/light/veml6031x00.c
> +++ b/drivers/iio/light/veml6031x00.c
> @@ -784,6 +784,7 @@ static int veml6031x00_read_event_config(struct iio_dev *iio,
> }
>
> static int veml6031x00_event_enable(struct veml6031x00_data *data)
> + __must_hold(&data->irq_lock)
> {
> struct device *dev = regmap_get_device(data->regmap);
> int ret;
> @@ -804,6 +805,7 @@ static int veml6031x00_event_enable(struct veml6031x00_data *data)
> }
>
> static int veml6031x00_event_disable(struct veml6031x00_data *data)
> + __must_hold(&data->irq_lock)
> {
> struct device *dev = regmap_get_device(data->regmap);
> int ret;
Thanks!
Reviewed-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 9/9] iio: enable context analysis for all drivers
2026-10-27 16:14 ` Andy Shevchenko
@ 2026-10-27 17:21 ` Marco Elver
0 siblings, 0 replies; 14+ messages in thread
From: Marco Elver @ 2026-10-27 17:21 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Rupesh Majhi, Alex Lanzano, Andy Shevchenko, Benson Leung,
David Lechner, Guenter Roeck, Jagath Jog J, Javier Carrasco,
Jean-Baptiste Maneyrol, Jerome Brunet, Jinseob Kim,
Jonathan Cameron, Kevin Hilman, Lorenzo Bianconi,
Martin Blumenstingl, Matti Vaittinen, Neil Armstrong,
Nuno Sá,
Remi Buisson, chrome-platform, linux-amlogic, linux-arm-kernel,
linux-arm-msm, linux-iio, linux-kernel, Bart Van Assche
On Tue, 27 Oct 2026 at 17:14, Andy Shevchenko
<andriy.shevchenko@intel.com> wrote:
>
> On Tue, Oct 27, 2026 at 02:49:54PM +0200, Rupesh Majhi wrote:
> > All of drivers/iio now builds without context analysis warnings, so
> > enable it in every Makefile that builds objects, replacing the entry
> > for dps310 alone.
>
> ...
>
> > +++ b/drivers/iio/Makefile
>
> > +CONTEXT_ANALYSIS := y
>
> Can we reduce the churn to only adding it here and do some magic to propagate
> this recursively, please? I truly believe it's feasible to achieve.
Should be:
subdir-ccflags-y += $(CFLAGS_CONTEXT_ANALYSIS)
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2026-10-27 17:22 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-27 12:49 [PATCH v4 0/9] iio: enable context analysis for all drivers Rupesh Majhi
2026-10-27 12:49 ` [PATCH v4 1/9] iio: adc: qcom-spmi-adc5-gen3: fix lock annotations on mutex helpers Rupesh Majhi
2026-10-27 12:49 ` [PATCH v4 2/9] iio: core: annotate the conditional mode claims Rupesh Majhi
2026-10-27 12:49 ` [PATCH v4 3/9] iio: core: mark the mode lock helpers __context_unsafe Rupesh Majhi
2026-10-27 12:49 ` [PATCH v4 4/9] iio: accel: kionix-kx022a: annotate the lock helpers Rupesh Majhi
2026-10-27 12:49 ` [PATCH v4 5/9] iio: adc: meson_saradc: " Rupesh Majhi
2026-10-27 12:49 ` [PATCH v4 6/9] iio: buffer-dma: annotate the queue " Rupesh Majhi
2026-10-27 12:49 ` [PATCH v4 7/9] iio: light: opt3001: mark the interrupt handler __context_unsafe Rupesh Majhi
2026-10-27 12:49 ` [PATCH v4 8/9] iio: light: veml6031x00: annotate the event enable helpers Rupesh Majhi
2026-10-27 16:52 ` Javier Carrasco
2026-10-27 12:49 ` [PATCH v4 9/9] iio: enable context analysis for all drivers Rupesh Majhi
2026-10-27 15:09 ` Kim Jinseob
2026-10-27 16:14 ` Andy Shevchenko
2026-10-27 17:21 ` Marco Elver
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®