Skip to contentSkip to conversation

iio: drop useless assignment of cache_type

PATCH Applied Andy Shevchenko 3 participants 6 messages Jan 29, 2025 – Feb 1, 2025

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

cover iio: drop useless assignment of cache_type

Default value is REGCACHE_NONE, no need to assign it explicitly. Fix all IIO drivers that do that.

Andy Shevchenko (3):
iio: light: adux1020: Drop unneeded assignment for cache_type
iio: magnetometer: af8133j: Drop unneeded assignment for cache_type
iio: pressure: zpa2326: Drop unneeded assignment for cache_type

 drivers/iio/light/adux1020.c       | 1 -
 drivers/iio/magnetometer/af8133j.c | 1 -
 drivers/iio/pressure/zpa2326_i2c.c | 1 -
 drivers/iio/pressure/zpa2326_spi.c | 1 -
 4 files changed, 4 deletions(-)
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
#1 lore raw

PATCH 1/3 iio: light: adux1020: Drop unneeded assignment for cache_type

REGCACHE_NONE is the default type of the cache when not provided. Drop unneeded explicit assignment to it.

Note, it's defined to 0, and if ever be redefined, it will break literally a lot of the drivers, so it very unlikely to happen.

---
 drivers/iio/light/adux1020.c | 1 -
 1 file changed, 1 deletion(-)
drivers/iio/light/adux1020.c +0 -1
index 593d614b1689..9240983a6cc4 100644
@@ -118,7 +118,6 @@ static const struct regmap_config adux1020_regmap_config = {
 	.reg_bits = 8,
 	.val_bits = 16,
 	.max_register = 0x6F,
-	.cache_type = REGCACHE_NONE,
 };
 
 static const struct reg_sequence adux1020_def_conf[] = {
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
#2 lore raw

PATCH 2/3 iio: magnetometer: af8133j: Drop unneeded assignment for cache_type

In reply to Andy Shevchenko

REGCACHE_NONE is the default type of the cache when not provided. Drop unneeded explicit assignment to it.

Note, it's defined to 0, and if ever be redefined, it will break literally a lot of the drivers, so it very unlikely to happen.

---
 drivers/iio/magnetometer/af8133j.c | 1 -
 1 file changed, 1 deletion(-)
drivers/iio/magnetometer/af8133j.c +0 -1
index a70bf8a3c73b..c1fc339e85b4 100644
@@ -383,7 +383,6 @@ static const struct regmap_config af8133j_regmap_config = {
 	.reg_bits = 8,
 	.val_bits = 8,
 	.max_register = AF8133J_REG_SWR,
-	.cache_type = REGCACHE_NONE,
 };
 
 static void af8133j_power_down_action(void *ptr)
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
#3 lore raw

PATCH 3/3 iio: pressure: zpa2326: Drop unneeded assignment for cache_type

In reply to Andy Shevchenko

REGCACHE_NONE is the default type of the cache when not provided. Drop unneeded explicit assignment to it.

Note, it's defined to 0, and if ever be redefined, it will break literally a lot of the drivers, so it very unlikely to happen.

---
 drivers/iio/pressure/zpa2326_i2c.c | 1 -
 drivers/iio/pressure/zpa2326_spi.c | 1 -
 2 files changed, 2 deletions(-)
drivers/iio/pressure/zpa2326_i2c.c +0 -1
index 49a239ebdabf..a6034bf05d97 100644
@@ -25,7 +25,6 @@ static const struct regmap_config zpa2326_regmap_i2c_config = {
 	.precious_reg   = zpa2326_isreg_precious,
 	.max_register   = ZPA2326_TEMP_OUT_H_REG,
 	.read_flag_mask = BIT(7),
-	.cache_type     = REGCACHE_NONE,
 };
 
 static unsigned int zpa2326_i2c_hwid(const struct i2c_client *client)
drivers/iio/pressure/zpa2326_spi.c +0 -1
index 317270fa1c43..c678f5b96266 100644
@@ -26,7 +26,6 @@ static const struct regmap_config zpa2326_regmap_spi_config = {
 	.precious_reg   = zpa2326_isreg_precious,
 	.max_register   = ZPA2326_TEMP_OUT_H_REG,
 	.read_flag_mask = BIT(7) | BIT(6),
-	.cache_type     = REGCACHE_NONE,
 };
 
 static int zpa2326_probe_spi(struct spi_device *spi)
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
Reviewed-by on the v1 series
#4 lore raw
In reply to Andy Shevchenko
Quoted 8 lines · Andy Shevchenko

Default value is REGCACHE_NONE, no need to assign it explicitly. Fix all IIO drivers that do that.

Andy Shevchenko (3):
  iio: light: adux1020: Drop unneeded assignment for cache_type
  iio: magnetometer: af8133j: Drop unneeded assignment for cache_type
  iio: pressure: zpa2326: Drop unneeded assignment for cache_type

Quoted 6 lines

 drivers/iio/light/adux1020.c       | 1 -

 drivers/iio/magnetometer/af8133j.c | 1 -
 drivers/iio/pressure/zpa2326_i2c.c | 1 -
 drivers/iio/pressure/zpa2326_spi.c | 1 -
 4 files changed, 4 deletions(-)
maintainer Applied
#5 lore raw
Quoted 9 lines · On Thu, 30 Jan 2025 08:30:47 +0000 Nuno Sá <[email protected]> wrote:
Quoted 8 lines · Andy Shevchenko

Default value is REGCACHE_NONE, no need to assign it explicitly. Fix all IIO drivers that do that.

Andy Shevchenko (3):
  iio: light: adux1020: Drop unneeded assignment for cache_type
  iio: magnetometer: af8133j: Drop unneeded assignment for cache_type
  iio: pressure: zpa2326: Drop unneeded assignment for cache_type

Quoted 8 lines
Quoted 6 lines

 drivers/iio/light/adux1020.c       | 1 -

 drivers/iio/magnetometer/af8133j.c | 1 -
 drivers/iio/pressure/zpa2326_i2c.c | 1 -
 drivers/iio/pressure/zpa2326_spi.c | 1 -
 4 files changed, 4 deletions(-)

Applied.

Thanks,

Jonathan