* [PATCH v2 00/13] iio: remove unused struct fields across drivers
@ 2026-02-02 11:25 Antoniu Miclaus
2026-02-02 11:25 ` [PATCH v2 01/13] iio: adc: ad4080: remove unused dec_rate field Antoniu Miclaus
` (13 more replies)
0 siblings, 14 replies; 19+ messages in thread
From: Antoniu Miclaus @ 2026-02-02 11:25 UTC (permalink / raw)
To: Antoniu Miclaus, Lars-Peter Clausen, Michael Hennerich,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Jagath Jog J, Subhajit Ghosh, Matti Vaittinen, Fabio Estevam,
Linus Walleij, Sakari Ailus, Marcelo Schmitt, Eugene Zaikonnikov,
linux-iio, linux-kernel
This series removes unused struct fields found across various IIO
drivers. These fields were either left over from previous refactoring,
or were added during development but never actually used.
Removing them reduces memory footprint slightly and improves code
clarity by eliminating dead struct members that could confuse future
readers.
Each patch is independent and can be merged separately as they touch
different drivers with no dependencies between them.
Changes since v1:
- Reformatted as proper series with cover letter and numbering
Antoniu Miclaus (13):
iio: adc: ad4080: remove unused dec_rate field
iio: adc: ad7768-1: remove unused mclk_div field
iio: adc: ad7793: remove unused int_vref_mv field
iio: adc: ad9467: remove unused output_mode field
iio: adc: max1363: remove unused requestedmask field
iio: adc: nau7802: remove unused min_conversions field
iio: adc: ti-ads1015: remove unused enabled field
iio: dac: adi-axi-dac: remove unused int_tone field
iio: dac: ti-dac5571: remove unused id field
iio: humidity: hdc2010: remove unused interrupt_config
iio: imu: bmi323: remove unused drdy_trigger_enabled
iio: light: apds9306: remove unused nlux_per_count
iio: light: gp2ap020a00f: remove unused debug_reg_addr
drivers/iio/adc/ad4080.c | 1 -
drivers/iio/adc/ad7768-1.c | 1 -
drivers/iio/adc/ad7793.c | 1 -
drivers/iio/adc/ad9467.c | 1 -
drivers/iio/adc/max1363.c | 2 --
drivers/iio/adc/nau7802.c | 1 -
drivers/iio/adc/ti-ads1015.c | 1 -
drivers/iio/dac/adi-axi-dac.c | 1 -
drivers/iio/dac/ti-dac5571.c | 1 -
drivers/iio/humidity/hdc2010.c | 1 -
drivers/iio/imu/bmi323/bmi323_core.c | 1 -
drivers/iio/light/apds9306.c | 2 --
drivers/iio/light/gp2ap020a00f.c | 1 -
13 files changed, 15 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v2 01/13] iio: adc: ad4080: remove unused dec_rate field
2026-02-02 11:25 [PATCH v2 00/13] iio: remove unused struct fields across drivers Antoniu Miclaus
@ 2026-02-02 11:25 ` Antoniu Miclaus
2026-02-02 11:25 ` [PATCH v2 02/13] iio: adc: ad7768-1: remove unused mclk_div field Antoniu Miclaus
` (12 subsequent siblings)
13 siblings, 0 replies; 19+ messages in thread
From: Antoniu Miclaus @ 2026-02-02 11:25 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Antoniu Miclaus,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Jagath Jog J, Subhajit Ghosh, Matti Vaittinen, Fabio Estevam,
Linus Walleij, Sakari Ailus, Eugene Zaikonnikov, Marcelo Schmitt,
linux-iio, linux-kernel
Remove unused dec_rate field from ad4080_state struct.
The driver reads/writes decimation rate directly from
hardware registers via ad4080_get_dec_rate() and
ad4080_set_dec_rate() functions.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
drivers/iio/adc/ad4080.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iio/adc/ad4080.c b/drivers/iio/adc/ad4080.c
index 7cf3b6ed7940..8bc092969c18 100644
--- a/drivers/iio/adc/ad4080.c
+++ b/drivers/iio/adc/ad4080.c
@@ -185,7 +185,6 @@ struct ad4080_state {
*/
struct mutex lock;
unsigned int num_lanes;
- unsigned int dec_rate;
unsigned long clk_rate;
enum ad4080_filter_type filter_type;
bool lvds_cnv_en;
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 02/13] iio: adc: ad7768-1: remove unused mclk_div field
2026-02-02 11:25 [PATCH v2 00/13] iio: remove unused struct fields across drivers Antoniu Miclaus
2026-02-02 11:25 ` [PATCH v2 01/13] iio: adc: ad4080: remove unused dec_rate field Antoniu Miclaus
@ 2026-02-02 11:25 ` Antoniu Miclaus
2026-02-02 11:25 ` [PATCH v2 03/13] iio: adc: ad7793: remove unused int_vref_mv field Antoniu Miclaus
` (11 subsequent siblings)
13 siblings, 0 replies; 19+ messages in thread
From: Antoniu Miclaus @ 2026-02-02 11:25 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Antoniu Miclaus,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Jagath Jog J, Subhajit Ghosh, Matti Vaittinen, Fabio Estevam,
Linus Walleij, Chen-Yu Tsai, Sakari Ailus, Eugene Zaikonnikov,
Marcelo Schmitt, linux-iio, linux-kernel
Remove unused mclk_div field from ad7768_state struct.
The field is declared but never accessed in the driver.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
drivers/iio/adc/ad7768-1.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iio/adc/ad7768-1.c b/drivers/iio/adc/ad7768-1.c
index fcd8aea7152e..5a0863cf22e9 100644
--- a/drivers/iio/adc/ad7768-1.c
+++ b/drivers/iio/adc/ad7768-1.c
@@ -290,7 +290,6 @@ struct ad7768_state {
unsigned int vcm_output_sel;
struct clk *mclk;
unsigned int mclk_freq;
- unsigned int mclk_div;
unsigned int oversampling_ratio;
enum ad7768_filter_type filter_type;
unsigned int samp_freq;
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 03/13] iio: adc: ad7793: remove unused int_vref_mv field
2026-02-02 11:25 [PATCH v2 00/13] iio: remove unused struct fields across drivers Antoniu Miclaus
2026-02-02 11:25 ` [PATCH v2 01/13] iio: adc: ad4080: remove unused dec_rate field Antoniu Miclaus
2026-02-02 11:25 ` [PATCH v2 02/13] iio: adc: ad7768-1: remove unused mclk_div field Antoniu Miclaus
@ 2026-02-02 11:25 ` Antoniu Miclaus
2026-02-02 11:25 ` [PATCH v2 04/13] iio: adc: ad9467: remove unused output_mode field Antoniu Miclaus
` (10 subsequent siblings)
13 siblings, 0 replies; 19+ messages in thread
From: Antoniu Miclaus @ 2026-02-02 11:25 UTC (permalink / raw)
To: Antoniu Miclaus, Lars-Peter Clausen, Michael Hennerich,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Jagath Jog J, Subhajit Ghosh, Fabio Estevam, Matti Vaittinen,
Chen-Yu Tsai, Sakari Ailus, Marcelo Schmitt, Eugene Zaikonnikov,
linux-iio, linux-kernel
Remove unused int_vref_mv field from ad7793_state struct.
The field is declared but never accessed in the driver.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
drivers/iio/adc/ad7793.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iio/adc/ad7793.c b/drivers/iio/adc/ad7793.c
index ccf18ce48e34..06317f5cb047 100644
--- a/drivers/iio/adc/ad7793.c
+++ b/drivers/iio/adc/ad7793.c
@@ -152,7 +152,6 @@ struct ad7793_chip_info {
struct ad7793_state {
const struct ad7793_chip_info *chip_info;
- u16 int_vref_mv;
u16 mode;
u16 conf;
u32 scale_avail[8][2];
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 04/13] iio: adc: ad9467: remove unused output_mode field
2026-02-02 11:25 [PATCH v2 00/13] iio: remove unused struct fields across drivers Antoniu Miclaus
` (2 preceding siblings ...)
2026-02-02 11:25 ` [PATCH v2 03/13] iio: adc: ad7793: remove unused int_vref_mv field Antoniu Miclaus
@ 2026-02-02 11:25 ` Antoniu Miclaus
2026-02-02 12:08 ` Tomas Melin
2026-02-02 11:25 ` [PATCH v2 05/13] iio: adc: max1363: remove unused requestedmask field Antoniu Miclaus
` (9 subsequent siblings)
13 siblings, 1 reply; 19+ messages in thread
From: Antoniu Miclaus @ 2026-02-02 11:25 UTC (permalink / raw)
To: Antoniu Miclaus, Lars-Peter Clausen, Michael Hennerich,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Jagath Jog J, Subhajit Ghosh, Fabio Estevam, Matti Vaittinen,
Linus Walleij, Sakari Ailus, Marcelo Schmitt, Eugene Zaikonnikov,
linux-iio, linux-kernel
Remove unused output_mode field from ad9467_state struct.
The field is declared but never accessed in the driver.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
drivers/iio/adc/ad9467.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iio/adc/ad9467.c b/drivers/iio/adc/ad9467.c
index 9cfe66425d4e..df0c05e7c60f 100644
--- a/drivers/iio/adc/ad9467.c
+++ b/drivers/iio/adc/ad9467.c
@@ -176,7 +176,6 @@ struct ad9467_state {
struct clk *clk;
/* used for debugfs */
struct ad9467_chan_test_mode *chan_test;
- unsigned int output_mode;
unsigned int (*scales)[2];
/*
* Times 2 because we may also invert the signal polarity and run the
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 05/13] iio: adc: max1363: remove unused requestedmask field
2026-02-02 11:25 [PATCH v2 00/13] iio: remove unused struct fields across drivers Antoniu Miclaus
` (3 preceding siblings ...)
2026-02-02 11:25 ` [PATCH v2 04/13] iio: adc: ad9467: remove unused output_mode field Antoniu Miclaus
@ 2026-02-02 11:25 ` Antoniu Miclaus
2026-02-02 11:25 ` [PATCH v2 06/13] iio: adc: nau7802: remove unused min_conversions field Antoniu Miclaus
` (8 subsequent siblings)
13 siblings, 0 replies; 19+ messages in thread
From: Antoniu Miclaus @ 2026-02-02 11:25 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Antoniu Miclaus,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Jagath Jog J, Subhajit Ghosh, Matti Vaittinen, Fabio Estevam,
Sakari Ailus, Marcelo Schmitt, Eugene Zaikonnikov, linux-iio,
linux-kernel
Remove unused requestedmask field from max1363_state struct.
The field is declared but never accessed in the driver.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
drivers/iio/adc/max1363.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/iio/adc/max1363.c b/drivers/iio/adc/max1363.c
index 9dd547e62b6c..5e0666343fcb 100644
--- a/drivers/iio/adc/max1363.c
+++ b/drivers/iio/adc/max1363.c
@@ -149,7 +149,6 @@ struct max1363_chip_info {
* @configbyte: cache of current device config byte
* @chip_info: chip model specific constants, available modes, etc.
* @current_mode: the scan mode of this chip
- * @requestedmask: a valid requested set of channels
* @lock: lock to ensure state is consistent
* @monitor_on: whether monitor mode is enabled
* @monitor_speed: parameter corresponding to device monitor speed setting
@@ -169,7 +168,6 @@ struct max1363_state {
u8 configbyte;
const struct max1363_chip_info *chip_info;
const struct max1363_mode *current_mode;
- u32 requestedmask;
struct mutex lock;
/* Using monitor modes and buffer at the same time is
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 06/13] iio: adc: nau7802: remove unused min_conversions field
2026-02-02 11:25 [PATCH v2 00/13] iio: remove unused struct fields across drivers Antoniu Miclaus
` (4 preceding siblings ...)
2026-02-02 11:25 ` [PATCH v2 05/13] iio: adc: max1363: remove unused requestedmask field Antoniu Miclaus
@ 2026-02-02 11:25 ` Antoniu Miclaus
2026-02-02 11:25 ` [PATCH v2 07/13] iio: adc: ti-ads1015: remove unused enabled field Antoniu Miclaus
` (7 subsequent siblings)
13 siblings, 0 replies; 19+ messages in thread
From: Antoniu Miclaus @ 2026-02-02 11:25 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Antoniu Miclaus,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Jagath Jog J, Subhajit Ghosh, Fabio Estevam, Matti Vaittinen,
Linus Walleij, Chen-Yu Tsai, Sakari Ailus, Eugene Zaikonnikov,
Marcelo Schmitt, linux-iio, linux-kernel
Remove unused min_conversions field from nau7802_state
struct. The field is declared but never accessed in the
driver.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
drivers/iio/adc/nau7802.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iio/adc/nau7802.c b/drivers/iio/adc/nau7802.c
index 458544cb8ee4..97e92c0427e9 100644
--- a/drivers/iio/adc/nau7802.c
+++ b/drivers/iio/adc/nau7802.c
@@ -55,7 +55,6 @@ struct nau7802_state {
struct mutex data_lock;
u32 vref_mv;
u32 conversion_count;
- u32 min_conversions;
u8 sample_rate;
u32 scale_avail[8];
struct completion value_ok;
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 07/13] iio: adc: ti-ads1015: remove unused enabled field
2026-02-02 11:25 [PATCH v2 00/13] iio: remove unused struct fields across drivers Antoniu Miclaus
` (5 preceding siblings ...)
2026-02-02 11:25 ` [PATCH v2 06/13] iio: adc: nau7802: remove unused min_conversions field Antoniu Miclaus
@ 2026-02-02 11:25 ` Antoniu Miclaus
2026-02-02 11:25 ` [PATCH v2 08/13] iio: dac: adi-axi-dac: remove unused int_tone field Antoniu Miclaus
` (6 subsequent siblings)
13 siblings, 0 replies; 19+ messages in thread
From: Antoniu Miclaus @ 2026-02-02 11:25 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Antoniu Miclaus,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Jagath Jog J, Subhajit Ghosh, Fabio Estevam, Matti Vaittinen,
Chen-Yu Tsai, Sakari Ailus, Marcelo Schmitt, Eugene Zaikonnikov,
linux-iio, linux-kernel
Remove unused enabled field from ads1015_channel_data
struct. The field is declared but never accessed in the
driver.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
drivers/iio/adc/ti-ads1015.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iio/adc/ti-ads1015.c b/drivers/iio/adc/ti-ads1015.c
index f2a93c63ca14..c7ffe47449e2 100644
--- a/drivers/iio/adc/ti-ads1015.c
+++ b/drivers/iio/adc/ti-ads1015.c
@@ -231,7 +231,6 @@ static const struct iio_event_spec ads1015_events[] = {
}
struct ads1015_channel_data {
- bool enabled;
unsigned int pga;
unsigned int data_rate;
};
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 08/13] iio: dac: adi-axi-dac: remove unused int_tone field
2026-02-02 11:25 [PATCH v2 00/13] iio: remove unused struct fields across drivers Antoniu Miclaus
` (6 preceding siblings ...)
2026-02-02 11:25 ` [PATCH v2 07/13] iio: adc: ti-ads1015: remove unused enabled field Antoniu Miclaus
@ 2026-02-02 11:25 ` Antoniu Miclaus
2026-02-02 11:25 ` [PATCH v2 09/13] iio: dac: ti-dac5571: remove unused id field Antoniu Miclaus
` (5 subsequent siblings)
13 siblings, 0 replies; 19+ messages in thread
From: Antoniu Miclaus @ 2026-02-02 11:25 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Antoniu Miclaus,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Jagath Jog J, Subhajit Ghosh, Matti Vaittinen, Fabio Estevam,
Sakari Ailus, Chen-Yu Tsai, Marcelo Schmitt, Eugene Zaikonnikov,
linux-iio, linux-kernel
Remove unused int_tone field from axi_dac_state struct.
The field is declared but never accessed in the driver.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
drivers/iio/dac/adi-axi-dac.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iio/dac/adi-axi-dac.c b/drivers/iio/dac/adi-axi-dac.c
index 9cc895bbe51a..1ca725c5dedc 100644
--- a/drivers/iio/dac/adi-axi-dac.c
+++ b/drivers/iio/dac/adi-axi-dac.c
@@ -114,7 +114,6 @@ struct axi_dac_state {
const struct axi_dac_info *info;
u64 dac_clk;
u32 reg_config;
- bool int_tone;
int dac_clk_rate;
};
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 09/13] iio: dac: ti-dac5571: remove unused id field
2026-02-02 11:25 [PATCH v2 00/13] iio: remove unused struct fields across drivers Antoniu Miclaus
` (7 preceding siblings ...)
2026-02-02 11:25 ` [PATCH v2 08/13] iio: dac: adi-axi-dac: remove unused int_tone field Antoniu Miclaus
@ 2026-02-02 11:25 ` Antoniu Miclaus
2026-02-02 11:26 ` [PATCH v2 10/13] iio: humidity: hdc2010: remove unused interrupt_config Antoniu Miclaus
` (4 subsequent siblings)
13 siblings, 0 replies; 19+ messages in thread
From: Antoniu Miclaus @ 2026-02-02 11:25 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Antoniu Miclaus,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Jagath Jog J, Subhajit Ghosh, Matti Vaittinen, Fabio Estevam,
Linus Walleij, Sakari Ailus, Eugene Zaikonnikov, Marcelo Schmitt,
linux-iio, linux-kernel
Remove unused id field from dac5571_data struct.
The field is declared but never accessed in the driver.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
drivers/iio/dac/ti-dac5571.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iio/dac/ti-dac5571.c b/drivers/iio/dac/ti-dac5571.c
index bdc3f94aef98..455d61fc3f13 100644
--- a/drivers/iio/dac/ti-dac5571.c
+++ b/drivers/iio/dac/ti-dac5571.c
@@ -45,7 +45,6 @@ static const struct dac5571_spec dac5571_spec[] = {
struct dac5571_data {
struct i2c_client *client;
- int id;
struct mutex lock;
struct regulator *vref;
u16 val[4];
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 10/13] iio: humidity: hdc2010: remove unused interrupt_config
2026-02-02 11:25 [PATCH v2 00/13] iio: remove unused struct fields across drivers Antoniu Miclaus
` (8 preceding siblings ...)
2026-02-02 11:25 ` [PATCH v2 09/13] iio: dac: ti-dac5571: remove unused id field Antoniu Miclaus
@ 2026-02-02 11:26 ` Antoniu Miclaus
2026-02-02 11:26 ` [PATCH v2 11/13] iio: imu: bmi323: remove unused drdy_trigger_enabled Antoniu Miclaus
` (3 subsequent siblings)
13 siblings, 0 replies; 19+ messages in thread
From: Antoniu Miclaus @ 2026-02-02 11:26 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Antoniu Miclaus,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Jagath Jog J, Subhajit Ghosh, Fabio Estevam, Matti Vaittinen,
Sakari Ailus, Chen-Yu Tsai, Marcelo Schmitt, Eugene Zaikonnikov,
linux-iio, linux-kernel
Remove unused interrupt_config field from hdc2010_data
struct. The field is declared but never accessed in the
driver.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
drivers/iio/humidity/hdc2010.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iio/humidity/hdc2010.c b/drivers/iio/humidity/hdc2010.c
index 894a8b4ab193..1a0f18251381 100644
--- a/drivers/iio/humidity/hdc2010.c
+++ b/drivers/iio/humidity/hdc2010.c
@@ -44,7 +44,6 @@ struct hdc2010_data {
struct i2c_client *client;
struct mutex lock;
u8 measurement_config;
- u8 interrupt_config;
u8 drdy_config;
};
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 11/13] iio: imu: bmi323: remove unused drdy_trigger_enabled
2026-02-02 11:25 [PATCH v2 00/13] iio: remove unused struct fields across drivers Antoniu Miclaus
` (9 preceding siblings ...)
2026-02-02 11:26 ` [PATCH v2 10/13] iio: humidity: hdc2010: remove unused interrupt_config Antoniu Miclaus
@ 2026-02-02 11:26 ` Antoniu Miclaus
2026-02-03 9:43 ` Andy Shevchenko
2026-02-02 11:26 ` [PATCH v2 12/13] iio: light: apds9306: remove unused nlux_per_count Antoniu Miclaus
` (2 subsequent siblings)
13 siblings, 1 reply; 19+ messages in thread
From: Antoniu Miclaus @ 2026-02-02 11:26 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Antoniu Miclaus,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Jagath Jog J, Subhajit Ghosh, Matti Vaittinen, Fabio Estevam,
Linus Walleij, Sakari Ailus, Marcelo Schmitt, Eugene Zaikonnikov,
linux-iio, linux-kernel
Remove unused drdy_trigger_enabled field from bmi323_data
struct. The field is declared but never accessed in the
driver.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
drivers/iio/imu/bmi323/bmi323_core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iio/imu/bmi323/bmi323_core.c b/drivers/iio/imu/bmi323/bmi323_core.c
index 6bcb9a436581..f3d499423399 100644
--- a/drivers/iio/imu/bmi323/bmi323_core.c
+++ b/drivers/iio/imu/bmi323/bmi323_core.c
@@ -156,7 +156,6 @@ struct bmi323_data {
struct iio_mount_matrix orientation;
enum bmi323_irq_pin irq_pin;
struct iio_trigger *trig;
- bool drdy_trigger_enabled;
enum bmi323_state state;
s64 fifo_tstamp, old_fifo_tstamp;
u32 odrns[BMI323_SENSORS_CNT];
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 12/13] iio: light: apds9306: remove unused nlux_per_count
2026-02-02 11:25 [PATCH v2 00/13] iio: remove unused struct fields across drivers Antoniu Miclaus
` (10 preceding siblings ...)
2026-02-02 11:26 ` [PATCH v2 11/13] iio: imu: bmi323: remove unused drdy_trigger_enabled Antoniu Miclaus
@ 2026-02-02 11:26 ` Antoniu Miclaus
2026-02-02 11:26 ` [PATCH v2 13/13] iio: light: gp2ap020a00f: remove unused debug_reg_addr Antoniu Miclaus
2026-02-03 9:44 ` [PATCH v2 00/13] iio: remove unused struct fields across drivers Andy Shevchenko
13 siblings, 0 replies; 19+ messages in thread
From: Antoniu Miclaus @ 2026-02-02 11:26 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Antoniu Miclaus,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Jagath Jog J, Subhajit Ghosh, Fabio Estevam, Matti Vaittinen,
Sakari Ailus, Linus Walleij, Chen-Yu Tsai, Marcelo Schmitt,
Eugene Zaikonnikov, linux-iio, linux-kernel
Remove unused nlux_per_count field from apds9306_data
struct. The field is declared but never accessed in the
driver.
Acked-by: Subhajit Ghosh <subhajit.ghosh@tweaklogic.com>
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
drivers/iio/light/apds9306.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/iio/light/apds9306.c b/drivers/iio/light/apds9306.c
index 5d18eabd961e..5ca4c87524fe 100644
--- a/drivers/iio/light/apds9306.c
+++ b/drivers/iio/light/apds9306.c
@@ -168,7 +168,6 @@ struct apds9306_regfields {
* respectively.
* @regmap: Regmap structure pointer
* @rf: Regmap register fields structure
- * @nlux_per_count: Nano lux per ADC count for a particular model
* @read_data_available: Flag set by IRQ handler for ADC data available
*/
struct apds9306_data {
@@ -180,7 +179,6 @@ struct apds9306_data {
struct regmap *regmap;
struct apds9306_regfields rf;
- int nlux_per_count;
int read_data_available;
};
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 13/13] iio: light: gp2ap020a00f: remove unused debug_reg_addr
2026-02-02 11:25 [PATCH v2 00/13] iio: remove unused struct fields across drivers Antoniu Miclaus
` (11 preceding siblings ...)
2026-02-02 11:26 ` [PATCH v2 12/13] iio: light: apds9306: remove unused nlux_per_count Antoniu Miclaus
@ 2026-02-02 11:26 ` Antoniu Miclaus
2026-02-03 9:44 ` [PATCH v2 00/13] iio: remove unused struct fields across drivers Andy Shevchenko
13 siblings, 0 replies; 19+ messages in thread
From: Antoniu Miclaus @ 2026-02-02 11:26 UTC (permalink / raw)
To: Antoniu Miclaus, Lars-Peter Clausen, Michael Hennerich,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Jagath Jog J, Subhajit Ghosh, Matti Vaittinen, Fabio Estevam,
Chen-Yu Tsai, Sakari Ailus, Marcelo Schmitt, Eugene Zaikonnikov,
linux-iio, linux-kernel
Remove unused debug_reg_addr field from gp2ap020a00f_data
struct. The field is declared but never accessed in the
driver.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
drivers/iio/light/gp2ap020a00f.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iio/light/gp2ap020a00f.c b/drivers/iio/light/gp2ap020a00f.c
index c7df4b258e2c..7cdd61db7096 100644
--- a/drivers/iio/light/gp2ap020a00f.c
+++ b/drivers/iio/light/gp2ap020a00f.c
@@ -246,7 +246,6 @@ struct gp2ap020a00f_data {
struct iio_trigger *trig;
struct regmap *regmap;
unsigned int thresh_val[4];
- u8 debug_reg_addr;
struct irq_work work;
wait_queue_head_t data_ready_queue;
};
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH v2 04/13] iio: adc: ad9467: remove unused output_mode field
2026-02-02 11:25 ` [PATCH v2 04/13] iio: adc: ad9467: remove unused output_mode field Antoniu Miclaus
@ 2026-02-02 12:08 ` Tomas Melin
0 siblings, 0 replies; 19+ messages in thread
From: Tomas Melin @ 2026-02-02 12:08 UTC (permalink / raw)
To: Antoniu Miclaus, Lars-Peter Clausen, Michael Hennerich,
Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
Jagath Jog J, Subhajit Ghosh, Fabio Estevam, Matti Vaittinen,
Linus Walleij, Sakari Ailus, Marcelo Schmitt, Eugene Zaikonnikov,
linux-iio, linux-kernel
On 02/02/2026 13:25, Antoniu Miclaus wrote:
> Remove unused output_mode field from ad9467_state struct.
> The field is declared but never accessed in the driver.
>
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Reviewed-by: Tomas Melin <tomas.melin@vaisala.com>
> ---
> drivers/iio/adc/ad9467.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/iio/adc/ad9467.c b/drivers/iio/adc/ad9467.c
> index 9cfe66425d4e..df0c05e7c60f 100644
> --- a/drivers/iio/adc/ad9467.c
> +++ b/drivers/iio/adc/ad9467.c
> @@ -176,7 +176,6 @@ struct ad9467_state {
> struct clk *clk;
> /* used for debugfs */
> struct ad9467_chan_test_mode *chan_test;
> - unsigned int output_mode;
> unsigned int (*scales)[2];
> /*
> * Times 2 because we may also invert the signal polarity and run the
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 11/13] iio: imu: bmi323: remove unused drdy_trigger_enabled
2026-02-02 11:26 ` [PATCH v2 11/13] iio: imu: bmi323: remove unused drdy_trigger_enabled Antoniu Miclaus
@ 2026-02-03 9:43 ` Andy Shevchenko
0 siblings, 0 replies; 19+ messages in thread
From: Andy Shevchenko @ 2026-02-03 9:43 UTC (permalink / raw)
To: Antoniu Miclaus
Cc: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
David Lechner, Nuno Sá, Andy Shevchenko, Jagath Jog J,
Subhajit Ghosh, Matti Vaittinen, Fabio Estevam, Linus Walleij,
Sakari Ailus, Marcelo Schmitt, Eugene Zaikonnikov, linux-iio,
linux-kernel
On Mon, Feb 02, 2026 at 01:26:01PM +0200, Antoniu Miclaus wrote:
> Remove unused drdy_trigger_enabled field from bmi323_data
> struct. The field is declared but never accessed in the
> driver.
...
> struct bmi323_data {
> struct iio_mount_matrix orientation;
> enum bmi323_irq_pin irq_pin;
> struct iio_trigger *trig;
> - bool drdy_trigger_enabled;
Hmm... Not directly related to your series, but with it applied it makes sense
to revisit the structure layouts as they might be rearranged to occupy less
space.
> enum bmi323_state state;
For example, this enum, if moved closer to irq_pin, might result in less gap on
some architectures. (Probably not, as we use long, id est 'int' sized, enums.)
In any way, `pahole` can hint about that, but as I said, it's not for this
series.
> s64 fifo_tstamp, old_fifo_tstamp;
> u32 odrns[BMI323_SENSORS_CNT];
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 00/13] iio: remove unused struct fields across drivers
2026-02-02 11:25 [PATCH v2 00/13] iio: remove unused struct fields across drivers Antoniu Miclaus
` (12 preceding siblings ...)
2026-02-02 11:26 ` [PATCH v2 13/13] iio: light: gp2ap020a00f: remove unused debug_reg_addr Antoniu Miclaus
@ 2026-02-03 9:44 ` Andy Shevchenko
2026-02-05 20:45 ` Jonathan Cameron
13 siblings, 1 reply; 19+ messages in thread
From: Andy Shevchenko @ 2026-02-03 9:44 UTC (permalink / raw)
To: Antoniu Miclaus
Cc: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
David Lechner, Nuno Sá, Andy Shevchenko, Jagath Jog J,
Subhajit Ghosh, Matti Vaittinen, Fabio Estevam, Linus Walleij,
Sakari Ailus, Marcelo Schmitt, Eugene Zaikonnikov, linux-iio,
linux-kernel
On Mon, Feb 02, 2026 at 01:25:50PM +0200, Antoniu Miclaus wrote:
> This series removes unused struct fields found across various IIO
> drivers. These fields were either left over from previous refactoring,
> or were added during development but never actually used.
>
> Removing them reduces memory footprint slightly and improves code
> clarity by eliminating dead struct members that could confuse future
> readers.
>
> Each patch is independent and can be merged separately as they touch
> different drivers with no dependencies between them.
Assuming it applies cleanly and compiles,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
and I see in some cases it gains space.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 00/13] iio: remove unused struct fields across drivers
2026-02-03 9:44 ` [PATCH v2 00/13] iio: remove unused struct fields across drivers Andy Shevchenko
@ 2026-02-05 20:45 ` Jonathan Cameron
2026-03-03 21:28 ` Jonathan Cameron
0 siblings, 1 reply; 19+ messages in thread
From: Jonathan Cameron @ 2026-02-05 20:45 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Antoniu Miclaus, Lars-Peter Clausen, Michael Hennerich,
David Lechner, Nuno Sá, Andy Shevchenko, Jagath Jog J,
Subhajit Ghosh, Matti Vaittinen, Fabio Estevam, Linus Walleij,
Sakari Ailus, Marcelo Schmitt, Eugene Zaikonnikov, linux-iio,
linux-kernel
On Tue, 3 Feb 2026 11:44:45 +0200
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> On Mon, Feb 02, 2026 at 01:25:50PM +0200, Antoniu Miclaus wrote:
> > This series removes unused struct fields found across various IIO
> > drivers. These fields were either left over from previous refactoring,
> > or were added during development but never actually used.
> >
> > Removing them reduces memory footprint slightly and improves code
> > clarity by eliminating dead struct members that could confuse future
> > readers.
> >
> > Each patch is independent and can be merged separately as they touch
> > different drivers with no dependencies between them.
>
> Assuming it applies cleanly and compiles,
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
> and I see in some cases it gains space.
>
Applied. Thanks!
J
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 00/13] iio: remove unused struct fields across drivers
2026-02-05 20:45 ` Jonathan Cameron
@ 2026-03-03 21:28 ` Jonathan Cameron
0 siblings, 0 replies; 19+ messages in thread
From: Jonathan Cameron @ 2026-03-03 21:28 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Antoniu Miclaus, Lars-Peter Clausen, Michael Hennerich,
David Lechner, Nuno Sá, Andy Shevchenko, Jagath Jog J,
Subhajit Ghosh, Matti Vaittinen, Fabio Estevam, Linus Walleij,
Sakari Ailus, Marcelo Schmitt, Eugene Zaikonnikov, linux-iio,
linux-kernel
On Thu, 5 Feb 2026 20:45:32 +0000
Jonathan Cameron <jic23@kernel.org> wrote:
> On Tue, 3 Feb 2026 11:44:45 +0200
> Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
>
> > On Mon, Feb 02, 2026 at 01:25:50PM +0200, Antoniu Miclaus wrote:
> > > This series removes unused struct fields found across various IIO
> > > drivers. These fields were either left over from previous refactoring,
> > > or were added during development but never actually used.
> > >
> > > Removing them reduces memory footprint slightly and improves code
> > > clarity by eliminating dead struct members that could confuse future
> > > readers.
> > >
> > > Each patch is independent and can be merged separately as they touch
> > > different drivers with no dependencies between them.
> >
> > Assuming it applies cleanly and compiles,
> > Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
> > and I see in some cases it gains space.
> >
>
> Applied. Thanks!
>
Unfortunately I was a Muppet and applied this to a temporary tree
then lost it. Now it's actually on the testing branch of iio.git.
Thanks,
Jonathan
> J
>
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2026-03-03 21:28 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-02 11:25 [PATCH v2 00/13] iio: remove unused struct fields across drivers Antoniu Miclaus
2026-02-02 11:25 ` [PATCH v2 01/13] iio: adc: ad4080: remove unused dec_rate field Antoniu Miclaus
2026-02-02 11:25 ` [PATCH v2 02/13] iio: adc: ad7768-1: remove unused mclk_div field Antoniu Miclaus
2026-02-02 11:25 ` [PATCH v2 03/13] iio: adc: ad7793: remove unused int_vref_mv field Antoniu Miclaus
2026-02-02 11:25 ` [PATCH v2 04/13] iio: adc: ad9467: remove unused output_mode field Antoniu Miclaus
2026-02-02 12:08 ` Tomas Melin
2026-02-02 11:25 ` [PATCH v2 05/13] iio: adc: max1363: remove unused requestedmask field Antoniu Miclaus
2026-02-02 11:25 ` [PATCH v2 06/13] iio: adc: nau7802: remove unused min_conversions field Antoniu Miclaus
2026-02-02 11:25 ` [PATCH v2 07/13] iio: adc: ti-ads1015: remove unused enabled field Antoniu Miclaus
2026-02-02 11:25 ` [PATCH v2 08/13] iio: dac: adi-axi-dac: remove unused int_tone field Antoniu Miclaus
2026-02-02 11:25 ` [PATCH v2 09/13] iio: dac: ti-dac5571: remove unused id field Antoniu Miclaus
2026-02-02 11:26 ` [PATCH v2 10/13] iio: humidity: hdc2010: remove unused interrupt_config Antoniu Miclaus
2026-02-02 11:26 ` [PATCH v2 11/13] iio: imu: bmi323: remove unused drdy_trigger_enabled Antoniu Miclaus
2026-02-03 9:43 ` Andy Shevchenko
2026-02-02 11:26 ` [PATCH v2 12/13] iio: light: apds9306: remove unused nlux_per_count Antoniu Miclaus
2026-02-02 11:26 ` [PATCH v2 13/13] iio: light: gp2ap020a00f: remove unused debug_reg_addr Antoniu Miclaus
2026-02-03 9:44 ` [PATCH v2 00/13] iio: remove unused struct fields across drivers Andy Shevchenko
2026-02-05 20:45 ` Jonathan Cameron
2026-03-03 21:28 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox