Skip to contentSkip to conversation

IIO dead struct cleanup

PATCH In review [email protected] 3 participants 6 messages May 22, 2024 – May 25, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover IIO dead struct cleanup

From: "Dr. David Alan Gilbert" <[email protected]>

Hi,
Three dead structs to cleanup in iio.
The bmi and pac are very recent.

(Build tested only)

Dr. David Alan Gilbert (3):
iio: accel: bmi088: remove unused struct 'bmi088_scale_info'
iio: adc: pac1934: remove unused struct 'samp_rate_mapping'
iio: light: rohm-bu27034: remove unused struct 'bu27034_result'

 drivers/iio/accel/bmi088-accel-core.c | 5 -----
 drivers/iio/adc/pac1934.c             | 5 -----
 drivers/iio/light/rohm-bu27034.c      | 6 ------
 3 files changed, 16 deletions(-)
Signature · 1 line
2.45.1
#1 lore raw

PATCH 1/3 iio: accel: bmi088: remove unused struct 'bmi088_scale_info'

From: "Dr. David Alan Gilbert" <[email protected]>

'bmi088_scale_info' has been unused since the original commit c19ae6be7555 ("iio: accel: Add support for the Bosch-Sensortec BMI088").

Remove it.

---
 drivers/iio/accel/bmi088-accel-core.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/iio/accel/bmi088-accel-core.c +0 -5
index 4d989708e6c3..469a1255d93c 100644
@@ -114,11 +114,6 @@ enum bmi088_odr_modes {
 	BMI088_ACCEL_MODE_ODR_1600 = 0xc,
 };
 
-struct bmi088_scale_info {
-	int scale;
-	u8 reg_range;
-};
-
 struct bmi088_accel_chip_info {
 	const char *name;
 	u8 chip_id;
Signature · 1 line
2.45.1
#2 lore raw

PATCH 2/3 iio: adc: pac1934: remove unused struct 'samp_rate_mapping'

In reply to [email protected]

From: "Dr. David Alan Gilbert" <[email protected]>

'samp_rate_mapping' has been unused since the original commit 0fb528c8255b ("iio: adc: adding support for PAC193x").

Remove it.

---
 drivers/iio/adc/pac1934.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/iio/adc/pac1934.c +0 -5
index 456f12faa348..ae24a27805ab 100644
@@ -227,11 +227,6 @@ struct pac1934_features {
 	const char	*name;
 };
 
-struct samp_rate_mapping {
-	u16 samp_rate;
-	u8 shift2value;
-};
-
 static const unsigned int samp_rate_map_tbl[] = {
 	[PAC1934_SAMP_1024SPS] = 1024,
 	[PAC1934_SAMP_256SPS] = 256,
Signature · 1 line
2.45.1
#3 lore raw

PATCH 3/3 iio: light: rohm-bu27034: remove unused struct 'bu27034_result'

In reply to [email protected]

From: "Dr. David Alan Gilbert" <[email protected]>

'bu27034_result' is unused since the original
commit e52afbd61039 ("iio: light: ROHM BU27034 Ambient Light Sensor").

Remove it.

---
 drivers/iio/light/rohm-bu27034.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/iio/light/rohm-bu27034.c +0 -6
index bf3de853a811..4937bf6fa046 100644
@@ -223,12 +223,6 @@ struct bu27034_data {
 	} scan;
 };
 
-struct bu27034_result {
-	u16 ch0;
-	u16 ch1;
-	u16 ch2;
-};
-
 static const struct regmap_range bu27034_volatile_ranges[] = {
 	{
 		.range_min = BU27034_REG_SYSTEM_CONTROL,
Signature · 1 line
2.45.1
maintainer Acked-by on v1 3/3
#4 lore raw

Re: [PATCH 3/3] iio: light: rohm-bu27034: remove unused struct 'bu27034_result'

Thanks David!

Quoted 8 lines · On 5/23/24 02:04, [email protected] wrote:

From: "Dr. David Alan Gilbert" <[email protected]>

'bu27034_result' is unused since the original
commit e52afbd61039 ("iio: light: ROHM BU27034 Ambient Light Sensor").

Remove it.

As I wrote earlier, this driver in it's current form is pretty much useless. The BU27034NUC was cancelled and, as far as I know, never produced "en masse". The replacement, BU27034ANUC, has undergone somewhat meaningful changes like removal of one of the data channels - so this driver is not producing correct results on that IC.

I have promised to rework this driver to support the new variant, and I have this new HW on my table - but I am currently negotiating to be able to provide an open-source Lux calculation formula in the driver... This is causing some slight delay.

So, I think applying this patch is still worth :)

Quoted 21 lines
---
  drivers/iio/light/rohm-bu27034.c | 6 ------
  1 file changed, 6 deletions(-)
drivers/iio/light/rohm-bu27034.c +0 -6
index bf3de853a811..4937bf6fa046 100644
@@ -223,12 +223,6 @@ struct bu27034_data {
  	} scan;
  };
 
-struct bu27034_result {
-	u16 ch0;
-	u16 ch1;
-	u16 ch2;
-};
-
  static const struct regmap_range bu27034_volatile_ranges[] = {
  	{
  		.range_min = BU27034_REG_SYSTEM_CONTROL,
Signature · 5 lines
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland

~~ When things go utterly wrong vim users can always type :help! ~~
maintainer
#5 lore raw
In reply to [email protected]
Quoted 11 lines · On Thu, 23 May 2024 00:04:54 +0100 [email protected] wrote:

From: "Dr. David Alan Gilbert" <[email protected]>

Hi,
Three dead structs to cleanup in iio.
The bmi and pac are very recent.

(Build tested only)

Series applied,

Thanks,

Jonathan

Quoted 10 lines

Dr. David Alan Gilbert (3):
iio: accel: bmi088: remove unused struct 'bmi088_scale_info'
iio: adc: pac1934: remove unused struct 'samp_rate_mapping'
iio: light: rohm-bu27034: remove unused struct 'bu27034_result'

 drivers/iio/accel/bmi088-accel-core.c | 5 -----
 drivers/iio/adc/pac1934.c             | 5 -----
 drivers/iio/light/rohm-bu27034.c      | 6 ------
 3 files changed, 16 deletions(-)