All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/11] iio: change from %ld to %pe for PTR_ERR() printing
@ 2026-06-04 11:59 Vojtěch Krátký
  2026-06-04 11:59 ` [PATCH v2 01/11] iio: accel: " Vojtěch Krátký
                   ` (10 more replies)
  0 siblings, 11 replies; 17+ messages in thread
From: Vojtěch Krátký @ 2026-06-04 11:59 UTC (permalink / raw)
  To: linux-iio; +Cc: Vojtěch Krátký

v1 -> v2:
- Improve commit message wording

Vojtěch Krátký (11):
  iio: accel: change from %ld to %pe for PTR_ERR() printing
  iio: adc: change from %ld to %pe for PTR_ERR() printing
  iio: chemical: change from %ld to %pe for PTR_ERR() printing
  iio: common: change from %ld to %pe for PTR_ERR() printing
  iio: dac: change from %ld to %pe for PTR_ERR() printing
  iio: gyro: change from %ld to %pe for PTR_ERR() printing
  iio: humidity: change from %ld to %pe for PTR_ERR() printing
  iio: imu: change from %ld to %pe for PTR_ERR() printing
  iio: light: change from %ld to %pe for PTR_ERR() printing
  iio: proximity: change from %ld to %pe for PTR_ERR() printing
  iio: resolver: change from %ld to %pe for PTR_ERR() printing

 drivers/iio/accel/adxl313_i2c.c                 |  4 ++--
 drivers/iio/accel/adxl313_spi.c                 |  4 ++--
 drivers/iio/accel/adxl355_i2c.c                 |  4 ++--
 drivers/iio/accel/adxl355_spi.c                 |  4 ++--
 drivers/iio/accel/kxsd9-spi.c                   |  4 ++--
 drivers/iio/adc/sun4i-gpadc-iio.c               |  6 +++---
 drivers/iio/chemical/bme680_i2c.c               |  2 +-
 drivers/iio/chemical/bme680_spi.c               |  2 +-
 drivers/iio/common/st_sensors/st_sensors_i2c.c  |  4 ++--
 drivers/iio/common/st_sensors/st_sensors_spi.c  |  4 ++--
 drivers/iio/dac/ad5770r.c                       |  4 ++--
 drivers/iio/dac/ltc1660.c                       |  4 ++--
 drivers/iio/gyro/fxas21002c_i2c.c               |  4 ++--
 drivers/iio/gyro/fxas21002c_spi.c               |  4 ++--
 drivers/iio/humidity/hts221_i2c.c               |  4 ++--
 drivers/iio/humidity/hts221_spi.c               |  4 ++--
 drivers/iio/imu/fxos8700_i2c.c                  |  2 +-
 drivers/iio/imu/fxos8700_spi.c                  |  2 +-
 drivers/iio/imu/inv_icm45600/inv_icm45600_i3c.c |  2 +-
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c     |  2 +-
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i3c.c     |  2 +-
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c     |  2 +-
 drivers/iio/light/gp2ap002.c                    |  2 +-
 drivers/iio/light/st_uvis25_i2c.c               |  4 ++--
 drivers/iio/light/st_uvis25_spi.c               |  4 ++--
 drivers/iio/proximity/ping.c                    |  4 ++--
 drivers/iio/proximity/srf04.c                   | 12 ++++++------
 drivers/iio/resolver/ad2s1200.c                 |  8 ++++----
 28 files changed, 54 insertions(+), 54 deletions(-)

-- 
2.54.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v2 01/11] iio: accel: change from %ld to %pe for PTR_ERR() printing
  2026-06-04 11:59 [PATCH v2 00/11] iio: change from %ld to %pe for PTR_ERR() printing Vojtěch Krátký
@ 2026-06-04 11:59 ` Vojtěch Krátký
  2026-06-04 12:13   ` Joshua Crofts
  2026-06-04 11:59 ` [PATCH v2 02/11] iio: adc: " Vojtěch Krátký
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 17+ messages in thread
From: Vojtěch Krátký @ 2026-06-04 11:59 UTC (permalink / raw)
  To: linux-iio
  Cc: Vojtěch Krátký, Lars-Peter Clausen,
	Michael Hennerich, Lucas Stankus, Jonathan Cameron, David Lechner,
	Nuno Sá, Andy Shevchenko, Puranjay Mohan, linux-kernel

Replace numeric PTR_ERR() logging with the %pe format specifier
so that error values are printed in a more readable form.

This change was identified using a Coccinelle semantic patch.

No functional change intended.

Signed-off-by: Vojtěch Krátký <vo.kratky@seznam.cz>
---
 drivers/iio/accel/adxl313_i2c.c | 4 ++--
 drivers/iio/accel/adxl313_spi.c | 4 ++--
 drivers/iio/accel/adxl355_i2c.c | 4 ++--
 drivers/iio/accel/adxl355_spi.c | 4 ++--
 drivers/iio/accel/kxsd9-spi.c   | 4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/iio/accel/adxl313_i2c.c b/drivers/iio/accel/adxl313_i2c.c
index b67ff0b4dc54..940f5dfc4ba0 100644
--- a/drivers/iio/accel/adxl313_i2c.c
+++ b/drivers/iio/accel/adxl313_i2c.c
@@ -76,8 +76,8 @@ static int adxl313_i2c_probe(struct i2c_client *client)
 	regmap = devm_regmap_init_i2c(client,
 				      &adxl31x_i2c_regmap_config[chip_data->type]);
 	if (IS_ERR(regmap)) {
-		dev_err(&client->dev, "Error initializing i2c regmap: %ld\n",
-			PTR_ERR(regmap));
+		dev_err(&client->dev, "Error initializing i2c regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 
diff --git a/drivers/iio/accel/adxl313_spi.c b/drivers/iio/accel/adxl313_spi.c
index dedb0885c277..254232ffb2e2 100644
--- a/drivers/iio/accel/adxl313_spi.c
+++ b/drivers/iio/accel/adxl313_spi.c
@@ -84,8 +84,8 @@ static int adxl313_spi_probe(struct spi_device *spi)
 				      &adxl31x_spi_regmap_config[chip_data->type]);
 
 	if (IS_ERR(regmap)) {
-		dev_err(&spi->dev, "Error initializing spi regmap: %ld\n",
-			PTR_ERR(regmap));
+		dev_err(&spi->dev, "Error initializing spi regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 
diff --git a/drivers/iio/accel/adxl355_i2c.c b/drivers/iio/accel/adxl355_i2c.c
index 1a512c7b792b..5e6aa5ba306a 100644
--- a/drivers/iio/accel/adxl355_i2c.c
+++ b/drivers/iio/accel/adxl355_i2c.c
@@ -31,8 +31,8 @@ static int adxl355_i2c_probe(struct i2c_client *client)
 
 	regmap = devm_regmap_init_i2c(client, &adxl355_i2c_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(&client->dev, "Error initializing i2c regmap: %ld\n",
-			PTR_ERR(regmap));
+		dev_err(&client->dev, "Error initializing i2c regmap: %pe\n",
+			regmap);
 
 		return PTR_ERR(regmap);
 	}
diff --git a/drivers/iio/accel/adxl355_spi.c b/drivers/iio/accel/adxl355_spi.c
index 869e3e57d6f7..ea22cd290c4d 100644
--- a/drivers/iio/accel/adxl355_spi.c
+++ b/drivers/iio/accel/adxl355_spi.c
@@ -34,8 +34,8 @@ static int adxl355_spi_probe(struct spi_device *spi)
 
 	regmap = devm_regmap_init_spi(spi, &adxl355_spi_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(&spi->dev, "Error initializing spi regmap: %ld\n",
-			PTR_ERR(regmap));
+		dev_err(&spi->dev, "Error initializing spi regmap: %pe\n",
+			regmap);
 
 		return PTR_ERR(regmap);
 	}
diff --git a/drivers/iio/accel/kxsd9-spi.c b/drivers/iio/accel/kxsd9-spi.c
index cbb6c6412665..afab3e1f651c 100644
--- a/drivers/iio/accel/kxsd9-spi.c
+++ b/drivers/iio/accel/kxsd9-spi.c
@@ -21,8 +21,8 @@ static int kxsd9_spi_probe(struct spi_device *spi)
 	spi->mode = SPI_MODE_0;
 	regmap = devm_regmap_init_spi(spi, &config);
 	if (IS_ERR(regmap)) {
-		dev_err(&spi->dev, "%s: regmap allocation failed: %ld\n",
-			__func__, PTR_ERR(regmap));
+		dev_err(&spi->dev, "%s: regmap allocation failed: %pe\n",
+			__func__, regmap);
 		return PTR_ERR(regmap);
 	}
 
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 02/11] iio: adc: change from %ld to %pe for PTR_ERR() printing
  2026-06-04 11:59 [PATCH v2 00/11] iio: change from %ld to %pe for PTR_ERR() printing Vojtěch Krátký
  2026-06-04 11:59 ` [PATCH v2 01/11] iio: accel: " Vojtěch Krátký
@ 2026-06-04 11:59 ` Vojtěch Krátký
  2026-06-04 12:12   ` sashiko-bot
  2026-06-13  8:06   ` Jernej Škrabec
  2026-06-04 11:59 ` [PATCH v2 03/11] iio: chemical: " Vojtěch Krátký
                   ` (8 subsequent siblings)
  10 siblings, 2 replies; 17+ messages in thread
From: Vojtěch Krátký @ 2026-06-04 11:59 UTC (permalink / raw)
  To: linux-iio
  Cc: Vojtěch Krátký, Jonathan Cameron, David Lechner,
	Nuno Sá, Andy Shevchenko, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland, Sakari Ailus, Linus Walleij, Wolfram Sang,
	linux-arm-kernel, linux-sunxi, linux-kernel

Replace numeric PTR_ERR() logging with the %pe format specifier
so that error values are printed in a more readable form.

This change was identified using a Coccinelle semantic patch.

No functional change intended.

Signed-off-by: Vojtěch Krátký <vo.kratky@seznam.cz>
---
 drivers/iio/adc/sun4i-gpadc-iio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c
index 479115ea50bf..5d7a61abcaea 100644
--- a/drivers/iio/adc/sun4i-gpadc-iio.c
+++ b/drivers/iio/adc/sun4i-gpadc-iio.c
@@ -508,7 +508,7 @@ static int sun4i_gpadc_probe_dt(struct platform_device *pdev,
 					     &sun4i_gpadc_regmap_config);
 	if (IS_ERR(info->regmap)) {
 		ret = PTR_ERR(info->regmap);
-		dev_err(&pdev->dev, "failed to init regmap: %d\n", ret);
+		dev_err(&pdev->dev, "failed to init regmap: %pe\n", info->regmap);
 		return ret;
 	}
 
@@ -639,8 +639,8 @@ static int sun4i_gpadc_probe(struct platform_device *pdev)
 		 */
 		if (IS_ERR(info->tzd) && PTR_ERR(info->tzd) != -ENODEV) {
 			dev_err(&pdev->dev,
-				"could not register thermal sensor: %ld\n",
-				PTR_ERR(info->tzd));
+				"could not register thermal sensor: %pe\n",
+				info->tzd);
 			return PTR_ERR(info->tzd);
 		}
 	}
-- 
2.54.0



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 03/11] iio: chemical: change from %ld to %pe for PTR_ERR() printing
  2026-06-04 11:59 [PATCH v2 00/11] iio: change from %ld to %pe for PTR_ERR() printing Vojtěch Krátký
  2026-06-04 11:59 ` [PATCH v2 01/11] iio: accel: " Vojtěch Krátký
  2026-06-04 11:59 ` [PATCH v2 02/11] iio: adc: " Vojtěch Krátký
@ 2026-06-04 11:59 ` Vojtěch Krátký
  2026-06-04 11:59 ` [PATCH v2 04/11] iio: common: " Vojtěch Krátký
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 17+ messages in thread
From: Vojtěch Krátký @ 2026-06-04 11:59 UTC (permalink / raw)
  To: linux-iio
  Cc: Vojtěch Krátký, Jonathan Cameron, David Lechner,
	Nuno Sá, Andy Shevchenko, linux-kernel

Replace numeric PTR_ERR() logging with the %pe format specifier
so that error values are printed in a more readable form.

This change was identified using a Coccinelle semantic patch.

No functional change intended.

Signed-off-by: Vojtěch Krátký <vo.kratky@seznam.cz>
---
 drivers/iio/chemical/bme680_i2c.c | 2 +-
 drivers/iio/chemical/bme680_spi.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/chemical/bme680_i2c.c b/drivers/iio/chemical/bme680_i2c.c
index 5560ea708b36..f812a56bfd26 100644
--- a/drivers/iio/chemical/bme680_i2c.c
+++ b/drivers/iio/chemical/bme680_i2c.c
@@ -25,7 +25,7 @@ static int bme680_i2c_probe(struct i2c_client *client)
 
 	regmap = devm_regmap_init_i2c(client, &bme680_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(&client->dev, "Failed to register i2c regmap %ld\n", PTR_ERR(regmap));
+		dev_err(&client->dev, "Failed to register i2c regmap %pe\n", regmap);
 		return PTR_ERR(regmap);
 	}
 
diff --git a/drivers/iio/chemical/bme680_spi.c b/drivers/iio/chemical/bme680_spi.c
index aa97645ba539..d557d92007b1 100644
--- a/drivers/iio/chemical/bme680_spi.c
+++ b/drivers/iio/chemical/bme680_spi.c
@@ -123,7 +123,7 @@ static int bme680_spi_probe(struct spi_device *spi)
 	regmap = devm_regmap_init(&spi->dev, &bme680_regmap_bus,
 				  bus_context, &bme680_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(&spi->dev, "Failed to register spi regmap %ld\n", PTR_ERR(regmap));
+		dev_err(&spi->dev, "Failed to register spi regmap %pe\n", regmap);
 		return PTR_ERR(regmap);
 	}
 
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 04/11] iio: common: change from %ld to %pe for PTR_ERR() printing
  2026-06-04 11:59 [PATCH v2 00/11] iio: change from %ld to %pe for PTR_ERR() printing Vojtěch Krátký
                   ` (2 preceding siblings ...)
  2026-06-04 11:59 ` [PATCH v2 03/11] iio: chemical: " Vojtěch Krátký
@ 2026-06-04 11:59 ` Vojtěch Krátký
  2026-06-04 11:59 ` [PATCH v2 05/11] iio: dac: " Vojtěch Krátký
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 17+ messages in thread
From: Vojtěch Krátký @ 2026-06-04 11:59 UTC (permalink / raw)
  To: linux-iio
  Cc: Vojtěch Krátký, Jonathan Cameron, David Lechner,
	Nuno Sá, Andy Shevchenko, linux-kernel

Replace numeric PTR_ERR() logging with the %pe format specifier
so that error values are printed in a more readable form.

This change was identified using a Coccinelle semantic patch.

No functional change intended.

Signed-off-by: Vojtěch Krátký <vo.kratky@seznam.cz>
---
 drivers/iio/common/st_sensors/st_sensors_i2c.c | 4 ++--
 drivers/iio/common/st_sensors/st_sensors_spi.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/iio/common/st_sensors/st_sensors_i2c.c b/drivers/iio/common/st_sensors/st_sensors_i2c.c
index 7156302fe997..ba35c53ee261 100644
--- a/drivers/iio/common/st_sensors/st_sensors_i2c.c
+++ b/drivers/iio/common/st_sensors/st_sensors_i2c.c
@@ -48,8 +48,8 @@ int st_sensors_i2c_configure(struct iio_dev *indio_dev,
 
 	sdata->regmap = devm_regmap_init_i2c(client, config);
 	if (IS_ERR(sdata->regmap)) {
-		dev_err(&client->dev, "Failed to register i2c regmap (%ld)\n",
-			PTR_ERR(sdata->regmap));
+		dev_err(&client->dev, "Failed to register i2c regmap (%pe)\n",
+			sdata->regmap);
 		return PTR_ERR(sdata->regmap);
 	}
 
diff --git a/drivers/iio/common/st_sensors/st_sensors_spi.c b/drivers/iio/common/st_sensors/st_sensors_spi.c
index 0da27013943d..cf6bcdd57004 100644
--- a/drivers/iio/common/st_sensors/st_sensors_spi.c
+++ b/drivers/iio/common/st_sensors/st_sensors_spi.c
@@ -100,8 +100,8 @@ int st_sensors_spi_configure(struct iio_dev *indio_dev,
 
 	sdata->regmap = devm_regmap_init_spi(spi, config);
 	if (IS_ERR(sdata->regmap)) {
-		dev_err(&spi->dev, "Failed to register spi regmap (%ld)\n",
-			PTR_ERR(sdata->regmap));
+		dev_err(&spi->dev, "Failed to register spi regmap (%pe)\n",
+			sdata->regmap);
 		return PTR_ERR(sdata->regmap);
 	}
 
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 05/11] iio: dac: change from %ld to %pe for PTR_ERR() printing
  2026-06-04 11:59 [PATCH v2 00/11] iio: change from %ld to %pe for PTR_ERR() printing Vojtěch Krátký
                   ` (3 preceding siblings ...)
  2026-06-04 11:59 ` [PATCH v2 04/11] iio: common: " Vojtěch Krátký
@ 2026-06-04 11:59 ` Vojtěch Krátký
  2026-06-04 11:59 ` [PATCH v2 06/11] iio: gyro: " Vojtěch Krátký
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 17+ messages in thread
From: Vojtěch Krátký @ 2026-06-04 11:59 UTC (permalink / raw)
  To: linux-iio
  Cc: Vojtěch Krátký, Lars-Peter Clausen,
	Michael Hennerich, Jonathan Cameron, David Lechner, Nuno Sá,
	Andy Shevchenko, Marcus Folkesson, linux-kernel

Replace numeric PTR_ERR() logging with the %pe format specifier
so that error values are printed in a more readable form.

This change was identified using a Coccinelle semantic patch.

No functional change intended.

Signed-off-by: Vojtěch Krátký <vo.kratky@seznam.cz>
---
 drivers/iio/dac/ad5770r.c | 4 ++--
 drivers/iio/dac/ltc1660.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/iio/dac/ad5770r.c b/drivers/iio/dac/ad5770r.c
index 6027e8d88b27..0a0ce3302a8c 100644
--- a/drivers/iio/dac/ad5770r.c
+++ b/drivers/iio/dac/ad5770r.c
@@ -607,8 +607,8 @@ static int ad5770r_probe(struct spi_device *spi)
 
 	regmap = devm_regmap_init_spi(spi, &ad5770r_spi_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(&spi->dev, "Error initializing spi regmap: %ld\n",
-			PTR_ERR(regmap));
+		dev_err(&spi->dev, "Error initializing spi regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 	st->regmap = regmap;
diff --git a/drivers/iio/dac/ltc1660.c b/drivers/iio/dac/ltc1660.c
index 6e80b49f4665..5875ad726794 100644
--- a/drivers/iio/dac/ltc1660.c
+++ b/drivers/iio/dac/ltc1660.c
@@ -167,8 +167,8 @@ static int ltc1660_probe(struct spi_device *spi)
 	priv = iio_priv(indio_dev);
 	priv->regmap = devm_regmap_init_spi(spi, &ltc1660_regmap_config);
 	if (IS_ERR(priv->regmap)) {
-		dev_err(&spi->dev, "failed to register spi regmap %ld\n",
-			PTR_ERR(priv->regmap));
+		dev_err(&spi->dev, "failed to register spi regmap %pe\n",
+			priv->regmap);
 		return PTR_ERR(priv->regmap);
 	}
 
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 06/11] iio: gyro: change from %ld to %pe for PTR_ERR() printing
  2026-06-04 11:59 [PATCH v2 00/11] iio: change from %ld to %pe for PTR_ERR() printing Vojtěch Krátký
                   ` (4 preceding siblings ...)
  2026-06-04 11:59 ` [PATCH v2 05/11] iio: dac: " Vojtěch Krátký
@ 2026-06-04 11:59 ` Vojtěch Krátký
  2026-06-04 20:08   ` Andy Shevchenko
  2026-06-04 11:59 ` [PATCH v2 07/11] iio: humidity: " Vojtěch Krátký
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 17+ messages in thread
From: Vojtěch Krátký @ 2026-06-04 11:59 UTC (permalink / raw)
  To: linux-iio
  Cc: Vojtěch Krátký, Rui Miguel Silva, Jonathan Cameron,
	David Lechner, Nuno Sá, Andy Shevchenko, linux-kernel

Replace numeric PTR_ERR() logging with the %pe format specifier
so that error values are printed in a more readable form.

This change was identified using a Coccinelle semantic patch.

No functional change intended.

Signed-off-by: Vojtěch Krátký <vo.kratky@seznam.cz>
---
 drivers/iio/gyro/fxas21002c_i2c.c | 4 ++--
 drivers/iio/gyro/fxas21002c_spi.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/iio/gyro/fxas21002c_i2c.c b/drivers/iio/gyro/fxas21002c_i2c.c
index 43c6b3079487..9ea9637c39d8 100644
--- a/drivers/iio/gyro/fxas21002c_i2c.c
+++ b/drivers/iio/gyro/fxas21002c_i2c.c
@@ -25,8 +25,8 @@ static int fxas21002c_i2c_probe(struct i2c_client *i2c)
 
 	regmap = devm_regmap_init_i2c(i2c, &fxas21002c_regmap_i2c_conf);
 	if (IS_ERR(regmap)) {
-		dev_err(&i2c->dev, "Failed to register i2c regmap: %ld\n",
-			PTR_ERR(regmap));
+		dev_err(&i2c->dev, "Failed to register i2c regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 
diff --git a/drivers/iio/gyro/fxas21002c_spi.c b/drivers/iio/gyro/fxas21002c_spi.c
index d62efe50b697..67ecf441c244 100644
--- a/drivers/iio/gyro/fxas21002c_spi.c
+++ b/drivers/iio/gyro/fxas21002c_spi.c
@@ -26,8 +26,8 @@ static int fxas21002c_spi_probe(struct spi_device *spi)
 
 	regmap = devm_regmap_init_spi(spi, &fxas21002c_regmap_spi_conf);
 	if (IS_ERR(regmap)) {
-		dev_err(&spi->dev, "Failed to register spi regmap: %ld\n",
-			PTR_ERR(regmap));
+		dev_err(&spi->dev, "Failed to register spi regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 07/11] iio: humidity: change from %ld to %pe for PTR_ERR() printing
  2026-06-04 11:59 [PATCH v2 00/11] iio: change from %ld to %pe for PTR_ERR() printing Vojtěch Krátký
                   ` (5 preceding siblings ...)
  2026-06-04 11:59 ` [PATCH v2 06/11] iio: gyro: " Vojtěch Krátký
@ 2026-06-04 11:59 ` Vojtěch Krátký
  2026-06-04 11:59 ` [PATCH v2 08/11] iio: imu: " Vojtěch Krátký
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 17+ messages in thread
From: Vojtěch Krátký @ 2026-06-04 11:59 UTC (permalink / raw)
  To: linux-iio
  Cc: Vojtěch Krátký, Lorenzo Bianconi, Jonathan Cameron,
	David Lechner, Nuno Sá, Andy Shevchenko, linux-kernel

Replace numeric PTR_ERR() logging with the %pe format specifier
so that error values are printed in a more readable form.

This change was identified using a Coccinelle semantic patch.

No functional change intended.

Signed-off-by: Vojtěch Krátký <vo.kratky@seznam.cz>
---
 drivers/iio/humidity/hts221_i2c.c | 4 ++--
 drivers/iio/humidity/hts221_spi.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/iio/humidity/hts221_i2c.c b/drivers/iio/humidity/hts221_i2c.c
index cbaa7d1af6c4..bf15f03cd3dd 100644
--- a/drivers/iio/humidity/hts221_i2c.c
+++ b/drivers/iio/humidity/hts221_i2c.c
@@ -31,8 +31,8 @@ static int hts221_i2c_probe(struct i2c_client *client)
 
 	regmap = devm_regmap_init_i2c(client, &hts221_i2c_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(&client->dev, "Failed to register i2c regmap %ld\n",
-			PTR_ERR(regmap));
+		dev_err(&client->dev, "Failed to register i2c regmap %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 
diff --git a/drivers/iio/humidity/hts221_spi.c b/drivers/iio/humidity/hts221_spi.c
index e6fef2acd523..15e46ad8707d 100644
--- a/drivers/iio/humidity/hts221_spi.c
+++ b/drivers/iio/humidity/hts221_spi.c
@@ -31,8 +31,8 @@ static int hts221_spi_probe(struct spi_device *spi)
 
 	regmap = devm_regmap_init_spi(spi, &hts221_spi_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(&spi->dev, "Failed to register spi regmap %ld\n",
-			PTR_ERR(regmap));
+		dev_err(&spi->dev, "Failed to register spi regmap %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 08/11] iio: imu: change from %ld to %pe for PTR_ERR() printing
  2026-06-04 11:59 [PATCH v2 00/11] iio: change from %ld to %pe for PTR_ERR() printing Vojtěch Krátký
                   ` (6 preceding siblings ...)
  2026-06-04 11:59 ` [PATCH v2 07/11] iio: humidity: " Vojtěch Krátký
@ 2026-06-04 11:59 ` Vojtěch Krátký
  2026-06-04 11:59 ` [PATCH v2 09/11] iio: light: " Vojtěch Krátký
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 17+ messages in thread
From: Vojtěch Krátký @ 2026-06-04 11:59 UTC (permalink / raw)
  To: linux-iio
  Cc: Vojtěch Krátký, Jonathan Cameron, David Lechner,
	Nuno Sá, Andy Shevchenko, Remi Buisson, Lorenzo Bianconi,
	linux-kernel

Replace numeric PTR_ERR() logging with the %pe format specifier
so that error values are printed in a more readable form.

This change was identified using a Coccinelle semantic patch.

No functional change intended.

Signed-off-by: Vojtěch Krátký <vo.kratky@seznam.cz>
---
 drivers/iio/imu/fxos8700_i2c.c                  | 2 +-
 drivers/iio/imu/fxos8700_spi.c                  | 2 +-
 drivers/iio/imu/inv_icm45600/inv_icm45600_i3c.c | 2 +-
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c     | 2 +-
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i3c.c     | 2 +-
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c     | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/iio/imu/fxos8700_i2c.c b/drivers/iio/imu/fxos8700_i2c.c
index 2cc4a27a4527..d60b62417325 100644
--- a/drivers/iio/imu/fxos8700_i2c.c
+++ b/drivers/iio/imu/fxos8700_i2c.c
@@ -25,7 +25,7 @@ static int fxos8700_i2c_probe(struct i2c_client *client)
 
 	regmap = devm_regmap_init_i2c(client, &fxos8700_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(&client->dev, "Failed to register i2c regmap %ld\n", PTR_ERR(regmap));
+		dev_err(&client->dev, "Failed to register i2c regmap %pe\n", regmap);
 		return PTR_ERR(regmap);
 	}
 
diff --git a/drivers/iio/imu/fxos8700_spi.c b/drivers/iio/imu/fxos8700_spi.c
index 6b0dc7a776b9..8d89ce8e92eb 100644
--- a/drivers/iio/imu/fxos8700_spi.c
+++ b/drivers/iio/imu/fxos8700_spi.c
@@ -16,7 +16,7 @@ static int fxos8700_spi_probe(struct spi_device *spi)
 
 	regmap = devm_regmap_init_spi(spi, &fxos8700_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(&spi->dev, "Failed to register spi regmap %ld\n", PTR_ERR(regmap));
+		dev_err(&spi->dev, "Failed to register spi regmap %pe\n", regmap);
 		return PTR_ERR(regmap);
 	}
 
diff --git a/drivers/iio/imu/inv_icm45600/inv_icm45600_i3c.c b/drivers/iio/imu/inv_icm45600/inv_icm45600_i3c.c
index 9247eae9b3e2..e08f9605c8b3 100644
--- a/drivers/iio/imu/inv_icm45600/inv_icm45600_i3c.c
+++ b/drivers/iio/imu/inv_icm45600/inv_icm45600_i3c.c
@@ -45,7 +45,7 @@ static int inv_icm45600_i3c_probe(struct i3c_device *i3cdev)
 	regmap = devm_regmap_init_i3c(i3cdev, &inv_icm45600_regmap_config);
 	if (IS_ERR(regmap))
 		return dev_err_probe(&i3cdev->dev, PTR_ERR(regmap),
-					"Failed to register i3c regmap %ld\n", PTR_ERR(regmap));
+					"Failed to register i3c regmap %pe\n", regmap);
 
 	ret = regmap_read(regmap, INV_ICM45600_REG_WHOAMI, &whoami);
 	if (ret)
diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c
index b2a7c2eaf50d..8a2b50a35f33 100644
--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c
+++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c
@@ -34,7 +34,7 @@ static int st_lsm6dsx_i2c_probe(struct i2c_client *client)
 
 	regmap = devm_regmap_init_i2c(client, &st_lsm6dsx_i2c_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(&client->dev, "Failed to register i2c regmap %ld\n", PTR_ERR(regmap));
+		dev_err(&client->dev, "Failed to register i2c regmap %pe\n", regmap);
 		return PTR_ERR(regmap);
 	}
 
diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i3c.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i3c.c
index cb5c5d7e1f3d..7326388cf228 100644
--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i3c.c
+++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i3c.c
@@ -34,7 +34,7 @@ static int st_lsm6dsx_i3c_probe(struct i3c_device *i3cdev)
 
 	regmap = devm_regmap_init_i3c(i3cdev, &st_lsm6dsx_i3c_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(dev, "Failed to register i3c regmap %ld\n", PTR_ERR(regmap));
+		dev_err(dev, "Failed to register i3c regmap %pe\n", regmap);
 		return PTR_ERR(regmap);
 	}
 
diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c
index 3389b15df0bc..75a7e0ab9b12 100644
--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c
+++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c
@@ -29,7 +29,7 @@ static int st_lsm6dsx_spi_probe(struct spi_device *spi)
 
 	regmap = devm_regmap_init_spi(spi, &st_lsm6dsx_spi_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(&spi->dev, "Failed to register spi regmap %ld\n", PTR_ERR(regmap));
+		dev_err(&spi->dev, "Failed to register spi regmap %pe\n", regmap);
 		return PTR_ERR(regmap);
 	}
 
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 09/11] iio: light: change from %ld to %pe for PTR_ERR() printing
  2026-06-04 11:59 [PATCH v2 00/11] iio: change from %ld to %pe for PTR_ERR() printing Vojtěch Krátký
                   ` (7 preceding siblings ...)
  2026-06-04 11:59 ` [PATCH v2 08/11] iio: imu: " Vojtěch Krátký
@ 2026-06-04 11:59 ` Vojtěch Krátký
  2026-06-04 11:59 ` [PATCH v2 10/11] iio: proximity: " Vojtěch Krátký
  2026-06-04 11:59 ` [PATCH v2 11/11] iio: resolver: " Vojtěch Krátký
  10 siblings, 0 replies; 17+ messages in thread
From: Vojtěch Krátký @ 2026-06-04 11:59 UTC (permalink / raw)
  To: linux-iio
  Cc: Vojtěch Krátký, Linus Walleij, Jonathan Cameron,
	David Lechner, Nuno Sá, Andy Shevchenko, linux-kernel

Replace numeric PTR_ERR() logging with the %pe format specifier
so that error values are printed in a more readable form.

This change was identified using a Coccinelle semantic patch.

No functional change intended.

Signed-off-by: Vojtěch Krátký <vo.kratky@seznam.cz>
---
 drivers/iio/light/gp2ap002.c      | 2 +-
 drivers/iio/light/st_uvis25_i2c.c | 4 ++--
 drivers/iio/light/st_uvis25_spi.c | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/iio/light/gp2ap002.c b/drivers/iio/light/gp2ap002.c
index a0d8a58f2704..5eb414e07a08 100644
--- a/drivers/iio/light/gp2ap002.c
+++ b/drivers/iio/light/gp2ap002.c
@@ -462,7 +462,7 @@ static int gp2ap002_probe(struct i2c_client *client)
 
 	regmap = devm_regmap_init(dev, &gp2ap002_regmap_bus, dev, &config);
 	if (IS_ERR(regmap)) {
-		dev_err(dev, "Failed to register i2c regmap %ld\n", PTR_ERR(regmap));
+		dev_err(dev, "Failed to register i2c regmap %pe\n", regmap);
 		return PTR_ERR(regmap);
 	}
 	gp2ap002->map = regmap;
diff --git a/drivers/iio/light/st_uvis25_i2c.c b/drivers/iio/light/st_uvis25_i2c.c
index 5d9bb4d9be63..00092ec68639 100644
--- a/drivers/iio/light/st_uvis25_i2c.c
+++ b/drivers/iio/light/st_uvis25_i2c.c
@@ -31,8 +31,8 @@ static int st_uvis25_i2c_probe(struct i2c_client *client)
 
 	regmap = devm_regmap_init_i2c(client, &st_uvis25_i2c_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(&client->dev, "Failed to register i2c regmap %ld\n",
-			PTR_ERR(regmap));
+		dev_err(&client->dev, "Failed to register i2c regmap %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 
diff --git a/drivers/iio/light/st_uvis25_spi.c b/drivers/iio/light/st_uvis25_spi.c
index a5aad74ce73e..6019208670f1 100644
--- a/drivers/iio/light/st_uvis25_spi.c
+++ b/drivers/iio/light/st_uvis25_spi.c
@@ -32,8 +32,8 @@ static int st_uvis25_spi_probe(struct spi_device *spi)
 
 	regmap = devm_regmap_init_spi(spi, &st_uvis25_spi_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(&spi->dev, "Failed to register spi regmap %ld\n",
-			PTR_ERR(regmap));
+		dev_err(&spi->dev, "Failed to register spi regmap %pe\n", 
+			regmap);
 		return PTR_ERR(regmap);
 	}
 
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 10/11] iio: proximity: change from %ld to %pe for PTR_ERR() printing
  2026-06-04 11:59 [PATCH v2 00/11] iio: change from %ld to %pe for PTR_ERR() printing Vojtěch Krátký
                   ` (8 preceding siblings ...)
  2026-06-04 11:59 ` [PATCH v2 09/11] iio: light: " Vojtěch Krátký
@ 2026-06-04 11:59 ` Vojtěch Krátký
  2026-06-04 11:59 ` [PATCH v2 11/11] iio: resolver: " Vojtěch Krátký
  10 siblings, 0 replies; 17+ messages in thread
From: Vojtěch Krátký @ 2026-06-04 11:59 UTC (permalink / raw)
  To: linux-iio
  Cc: Vojtěch Krátký, Andreas Klinger, Jonathan Cameron,
	David Lechner, Nuno Sá, Andy Shevchenko, linux-kernel

Replace numeric PTR_ERR() logging with the %pe format specifier
so that error values are printed in a more readable form.

This change was identified using a Coccinelle semantic patch.

No functional change intended.

Signed-off-by: Vojtěch Krátký <vo.kratky@seznam.cz>
---
 drivers/iio/proximity/ping.c  |  4 ++--
 drivers/iio/proximity/srf04.c | 12 ++++++------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/iio/proximity/ping.c b/drivers/iio/proximity/ping.c
index e3487094d7be..c54978c1a888 100644
--- a/drivers/iio/proximity/ping.c
+++ b/drivers/iio/proximity/ping.c
@@ -293,8 +293,8 @@ static int ping_probe(struct platform_device *pdev)
 
 	data->gpiod_ping = devm_gpiod_get(dev, "ping", GPIOD_OUT_LOW);
 	if (IS_ERR(data->gpiod_ping)) {
-		dev_err(dev, "failed to get ping-gpios: err=%ld\n",
-						PTR_ERR(data->gpiod_ping));
+		dev_err(dev, "failed to get ping-gpios: err=%pe\n",
+			data->gpiod_ping);
 		return PTR_ERR(data->gpiod_ping);
 	}
 
diff --git a/drivers/iio/proximity/srf04.c b/drivers/iio/proximity/srf04.c
index e97f9a20ac7a..06700a4cf275 100644
--- a/drivers/iio/proximity/srf04.c
+++ b/drivers/iio/proximity/srf04.c
@@ -264,23 +264,23 @@ static int srf04_probe(struct platform_device *pdev)
 
 	data->gpiod_trig = devm_gpiod_get(dev, "trig", GPIOD_OUT_LOW);
 	if (IS_ERR(data->gpiod_trig)) {
-		dev_err(dev, "failed to get trig-gpios: err=%ld\n",
-					PTR_ERR(data->gpiod_trig));
+		dev_err(dev, "failed to get trig-gpios: err=%pe\n",
+					data->gpiod_trig);
 		return PTR_ERR(data->gpiod_trig);
 	}
 
 	data->gpiod_echo = devm_gpiod_get(dev, "echo", GPIOD_IN);
 	if (IS_ERR(data->gpiod_echo)) {
-		dev_err(dev, "failed to get echo-gpios: err=%ld\n",
-					PTR_ERR(data->gpiod_echo));
+		dev_err(dev, "failed to get echo-gpios: err=%pe\n",
+					data->gpiod_echo);
 		return PTR_ERR(data->gpiod_echo);
 	}
 
 	data->gpiod_power = devm_gpiod_get_optional(dev, "power",
 								GPIOD_OUT_LOW);
 	if (IS_ERR(data->gpiod_power)) {
-		dev_err(dev, "failed to get power-gpios: err=%ld\n",
-						PTR_ERR(data->gpiod_power));
+		dev_err(dev, "failed to get power-gpios: err=%pe\n",
+						data->gpiod_power);
 		return PTR_ERR(data->gpiod_power);
 	}
 	if (data->gpiod_power) {
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 11/11] iio: resolver: change from %ld to %pe for PTR_ERR() printing
  2026-06-04 11:59 [PATCH v2 00/11] iio: change from %ld to %pe for PTR_ERR() printing Vojtěch Krátký
                   ` (9 preceding siblings ...)
  2026-06-04 11:59 ` [PATCH v2 10/11] iio: proximity: " Vojtěch Krátký
@ 2026-06-04 11:59 ` Vojtěch Krátký
  10 siblings, 0 replies; 17+ messages in thread
From: Vojtěch Krátký @ 2026-06-04 11:59 UTC (permalink / raw)
  To: linux-iio
  Cc: Vojtěch Krátký, Lars-Peter Clausen,
	Michael Hennerich, Jonathan Cameron, David Lechner, Nuno Sá,
	Andy Shevchenko, linux-kernel

Replace numeric PTR_ERR() logging with the %pe format specifier
so that error values are printed in a more readable form.

This change was identified using a Coccinelle semantic patch.

No functional change intended.

Signed-off-by: Vojtěch Krátký <vo.kratky@seznam.cz>
---
 drivers/iio/resolver/ad2s1200.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/iio/resolver/ad2s1200.c b/drivers/iio/resolver/ad2s1200.c
index c00a60cb31a5..3a6a66553839 100644
--- a/drivers/iio/resolver/ad2s1200.c
+++ b/drivers/iio/resolver/ad2s1200.c
@@ -145,15 +145,15 @@ static int ad2s1200_probe(struct spi_device *spi)
 
 	st->sample = devm_gpiod_get(&spi->dev, "adi,sample", GPIOD_OUT_LOW);
 	if (IS_ERR(st->sample)) {
-		dev_err(&spi->dev, "Failed to claim SAMPLE gpio: err=%ld\n",
-			PTR_ERR(st->sample));
+		dev_err(&spi->dev, "Failed to claim SAMPLE gpio: err=%pe\n",
+			st->sample);
 		return PTR_ERR(st->sample);
 	}
 
 	st->rdvel = devm_gpiod_get(&spi->dev, "adi,rdvel", GPIOD_OUT_LOW);
 	if (IS_ERR(st->rdvel)) {
-		dev_err(&spi->dev, "Failed to claim RDVEL gpio: err=%ld\n",
-			PTR_ERR(st->rdvel));
+		dev_err(&spi->dev, "Failed to claim RDVEL gpio: err=%pe\n",
+			st->rdvel);
 		return PTR_ERR(st->rdvel);
 	}
 
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 02/11] iio: adc: change from %ld to %pe for PTR_ERR() printing
  2026-06-04 11:59 ` [PATCH v2 02/11] iio: adc: " Vojtěch Krátký
@ 2026-06-04 12:12   ` sashiko-bot
  2026-06-13  8:06   ` Jernej Škrabec
  1 sibling, 0 replies; 17+ messages in thread
From: sashiko-bot @ 2026-06-04 12:12 UTC (permalink / raw)
  To: Vojtěch Krátký; +Cc: linux-sunxi

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:

Pre-existing issues:
- [High] Direct return on devm_thermal_of_zone_register failure skips critical error cleanup (PM leak and Use-After-Free).
- [High] Unbalanced disable_irq() on sun4i_prepare_for_irq() error path permanently disables the IRQ.
--

commit 4c81144898d1e91a3f1c0bfb6354a6f38c7251b4
Author: Vojtěch Krátký <vo.kratky@seznam.cz>

iio: adc: change from %ld to %pe for PTR_ERR() printing

This commit replaces numeric PTR_ERR() logging with the %pe format specifier.
The goal is to print error values in a more readable form.

> diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c
> index 479115ea50bf9..5d7a61abcaeae 100644
> --- a/drivers/iio/adc/sun4i-gpadc-iio.c
> +++ b/drivers/iio/adc/sun4i-gpadc-iio.c

[ ... ]

> @@ -639,8 +639,8 @@ static int sun4i_gpadc_probe(struct platform_device *pdev)
>  		 */
>  		if (IS_ERR(info->tzd) && PTR_ERR(info->tzd) != -ENODEV) {
>  			dev_err(&pdev->dev,
> -				"could not register thermal sensor: %ld\n",
> -				PTR_ERR(info->tzd));
> +				"could not register thermal sensor: %pe\n",
> +				info->tzd);
>  			return PTR_ERR(info->tzd);

[Severity: High]
This isn't a bug introduced by this patch, but returning directly here
skips the err_map cleanup label.

If devm_thermal_of_zone_register() fails with an error other than -ENODEV,
this code returns directly. Does this leave the device's runtime PM enabled
because the pm_runtime_disable() call in the err_map block is skipped?

Also, if the device was probed via sun4i_gpadc_probe_mfd(),
iio_map_array_register() was successfully called earlier:

drivers/iio/adc/sun4i-gpadc-iio.c:sun4i_gpadc_probe_mfd() {
    ...
    ret = iio_map_array_register(indio_dev, sun4i_gpadc_hwmon_maps);
    ...
}

By skipping iio_map_array_unregister() at the err_map label, does this
leave a dangling pointer in the global IIO maps pointing to indio_dev?
Since indio_dev is managed by devres (devm_iio_device_alloc), its memory
will be freed immediately upon probe failure. Could this result in a
use-after-free when another subsystem attempts to read from the map?

>  		}
>  	}

While reviewing this file, I also noticed another pre-existing regression in
sun4i_gpadc_read().

[Severity: High]
This is a pre-existing issue, but does the unbalanced disable_irq() on the
sun4i_prepare_for_irq() error path permanently disable the IRQ?

drivers/iio/adc/sun4i-gpadc-iio.c:sun4i_gpadc_read() {
    ...
    ret = sun4i_prepare_for_irq(indio_dev, channel, irq);
    if (ret)
        goto err;

    enable_irq(irq);
    ...
err:
    pm_runtime_put_autosuspend(indio_dev->dev.parent);
    disable_irq(irq);
    mutex_unlock(&info->mutex);
}

If sun4i_prepare_for_irq() fails, the code jumps to the err label and
unconditionally executes disable_irq(irq). Because enable_irq(irq) was never
reached, this increases the IRQ disable depth. 

Since the IRQs are initially requested with IRQF_NO_AUTOEN
(initial depth = 1), the unbalanced disable_irq() bumps the depth to 2.
On subsequent successful reads, enable_irq() will only decrement the depth
back to 1. Does this leave the IRQ permanently masked, causing
wait_for_completion_timeout() to continually time out?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260604120201.116925-1-vo.kratky@seznam.cz?part=2

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 01/11] iio: accel: change from %ld to %pe for PTR_ERR() printing
  2026-06-04 11:59 ` [PATCH v2 01/11] iio: accel: " Vojtěch Krátký
@ 2026-06-04 12:13   ` Joshua Crofts
  2026-06-05 11:57     ` Jonathan Cameron
  0 siblings, 1 reply; 17+ messages in thread
From: Joshua Crofts @ 2026-06-04 12:13 UTC (permalink / raw)
  To: Vojtěch Krátký
  Cc: linux-iio, Lars-Peter Clausen, Michael Hennerich, Lucas Stankus,
	Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Puranjay Mohan, linux-kernel

On Thu, 4 Jun 2026 at 14:11, Vojtěch Krátký <vo.kratky@seznam.cz> wrote:
>
> Replace numeric PTR_ERR() logging with the %pe format specifier
> so that error values are printed in a more readable form.
>
> This change was identified using a Coccinelle semantic patch.
>
> No functional change intended.
>
> Signed-off-by: Vojtěch Krátký <vo.kratky@seznam.cz>
> ---

Thanks for the change, but in the future, please slow down! Let the current
version sit for at least 24 hours before sending a new version so that
everyone has an opportunity to review it.

-- 
Kind regards

CJD

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 06/11] iio: gyro: change from %ld to %pe for PTR_ERR() printing
  2026-06-04 11:59 ` [PATCH v2 06/11] iio: gyro: " Vojtěch Krátký
@ 2026-06-04 20:08   ` Andy Shevchenko
  0 siblings, 0 replies; 17+ messages in thread
From: Andy Shevchenko @ 2026-06-04 20:08 UTC (permalink / raw)
  To: Vojtěch Krátký
  Cc: linux-iio, Rui Miguel Silva, Jonathan Cameron, David Lechner,
	Nuno Sá, Andy Shevchenko, linux-kernel

On Thu, Jun 4, 2026 at 3:03 PM Vojtěch Krátký <vo.kratky@seznam.cz> wrote:
>
> Replace numeric PTR_ERR() logging with the %pe format specifier
> so that error values are printed in a more readable form.
>
> This change was identified using a Coccinelle semantic patch.
>
> No functional change intended.

NAK (in this form). See below why.
Also note, the same applies to the similar cases in all patches like this.

...

>         regmap = devm_regmap_init_i2c(i2c, &fxas21002c_regmap_i2c_conf);
>         if (IS_ERR(regmap)) {
> -               dev_err(&i2c->dev, "Failed to register i2c regmap: %ld\n",
> -                       PTR_ERR(regmap));
> +               dev_err(&i2c->dev, "Failed to register i2c regmap: %pe\n",
> +                       regmap);
>                 return PTR_ERR(regmap);

This should be simply moved to dev_err_probe(). With that %pe will be
implied. Also it will save the time to move to dev_err_probe()
directly without any trampoline like this.

>         }

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 01/11] iio: accel: change from %ld to %pe for PTR_ERR() printing
  2026-06-04 12:13   ` Joshua Crofts
@ 2026-06-05 11:57     ` Jonathan Cameron
  0 siblings, 0 replies; 17+ messages in thread
From: Jonathan Cameron @ 2026-06-05 11:57 UTC (permalink / raw)
  To: Joshua Crofts
  Cc: Vojtěch Krátký, linux-iio, Lars-Peter Clausen,
	Michael Hennerich, Lucas Stankus, David Lechner, Nuno Sá,
	Andy Shevchenko, Puranjay Mohan, linux-kernel

On Thu, 4 Jun 2026 14:13:56 +0200
Joshua Crofts <joshua.crofts1@gmail.com> wrote:

> On Thu, 4 Jun 2026 at 14:11, Vojtěch Krátký <vo.kratky@seznam.cz> wrote:
> >
> > Replace numeric PTR_ERR() logging with the %pe format specifier
> > so that error values are printed in a more readable form.
> >
> > This change was identified using a Coccinelle semantic patch.
> >
> > No functional change intended.
> >
> > Signed-off-by: Vojtěch Krátký <vo.kratky@seznam.cz>
> > ---  
> 
> Thanks for the change, but in the future, please slow down! Let the current
> version sit for at least 24 hours before sending a new version so that
> everyone has an opportunity to review it.
> 

Further to this, when doing a change across a bunch of drivers, send one or two
as a test first to see what feedback you get.  You'd have gotten the reply from
Andy to such a patch without wasting as much of your time!

Jonathan


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 02/11] iio: adc: change from %ld to %pe for PTR_ERR() printing
  2026-06-04 11:59 ` [PATCH v2 02/11] iio: adc: " Vojtěch Krátký
  2026-06-04 12:12   ` sashiko-bot
@ 2026-06-13  8:06   ` Jernej Škrabec
  1 sibling, 0 replies; 17+ messages in thread
From: Jernej Škrabec @ 2026-06-13  8:06 UTC (permalink / raw)
  To: linux-iio, Vojtěch Krátký
  Cc: Vojtěch Krátký, Jonathan Cameron, David Lechner,
	Nuno Sá, Andy Shevchenko, Chen-Yu Tsai, Samuel Holland,
	Sakari Ailus, Linus Walleij, Wolfram Sang, linux-arm-kernel,
	linux-sunxi, linux-kernel

Dne četrtek, 4. junij 2026 ob 13:59:22 Srednjeevropski poletni čas je Vojtěch Krátký napisal(a):
> Replace numeric PTR_ERR() logging with the %pe format specifier
> so that error values are printed in a more readable form.
> 
> This change was identified using a Coccinelle semantic patch.
> 
> No functional change intended.
> 
> Signed-off-by: Vojtěch Krátký <vo.kratky@seznam.cz>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2026-06-13  8:06 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-04 11:59 [PATCH v2 00/11] iio: change from %ld to %pe for PTR_ERR() printing Vojtěch Krátký
2026-06-04 11:59 ` [PATCH v2 01/11] iio: accel: " Vojtěch Krátký
2026-06-04 12:13   ` Joshua Crofts
2026-06-05 11:57     ` Jonathan Cameron
2026-06-04 11:59 ` [PATCH v2 02/11] iio: adc: " Vojtěch Krátký
2026-06-04 12:12   ` sashiko-bot
2026-06-13  8:06   ` Jernej Škrabec
2026-06-04 11:59 ` [PATCH v2 03/11] iio: chemical: " Vojtěch Krátký
2026-06-04 11:59 ` [PATCH v2 04/11] iio: common: " Vojtěch Krátký
2026-06-04 11:59 ` [PATCH v2 05/11] iio: dac: " Vojtěch Krátký
2026-06-04 11:59 ` [PATCH v2 06/11] iio: gyro: " Vojtěch Krátký
2026-06-04 20:08   ` Andy Shevchenko
2026-06-04 11:59 ` [PATCH v2 07/11] iio: humidity: " Vojtěch Krátký
2026-06-04 11:59 ` [PATCH v2 08/11] iio: imu: " Vojtěch Krátký
2026-06-04 11:59 ` [PATCH v2 09/11] iio: light: " Vojtěch Krátký
2026-06-04 11:59 ` [PATCH v2 10/11] iio: proximity: " Vojtěch Krátký
2026-06-04 11:59 ` [PATCH v2 11/11] iio: resolver: " Vojtěch Krátký

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.