Skip to contentSkip to conversation

Use vsprintf extension %pe for symbolic error

PATCH Applied Nishant Malpani 2 participants 26 messages Mar 22, 2020 – Mar 28, 2020

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

v2 cover Use vsprintf extension %pe for symbolic error

This patchset utilizes %pe format specifier from vsprintf while logging errors which removes unnecessary explicit casting and logs symbolic error names instead of the error number.

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Nishant Malpani (13):
iio: accel: kxsd9: Use vsprintf extension %pe for symbolic error name
iio: st_sensors_i2c: Use vsprintf extension %pe for symbolic error
name
iio: st_sensors_spi: Use vsprintf extension %pe for symbolic error
name
iio: gyro: bmg160_i2c: Use vsprintf extension %pe for symbolic error
name
iio: gyro: bmg160_spi: Use vsprintf extension %pe for symbolic error
name
iio: gyro: mpu3050: Use vsprintf extension %pe for symbolic error name
iio: imu: bmi160_i2c: Use vsprintf extension %pe for symbolic error
name
iio: imu: bmi160_spi: Use vsprintf extension %pe for symbolic error
name
iio: imu: inv_mpu6050_i2c: Use vsprintf extension %pe for symbolic
error name
iio: imu: inv_mpu6050_spi: Use vsprintf extension %pe for symbolic
error name
iio: light: st_uvis25_i2c: Use vsprintf extension %pe for symbolic
error name
iio: light: st_uvis25_spi: Use vsprintf extension %pe for symbolic
error name
iio: magn: bmc150: Use vsprintf extension %pe for symbolic error name

 drivers/iio/accel/kxsd9-i2c.c                  | 4 ++--
 drivers/iio/common/st_sensors/st_sensors_i2c.c | 4 ++--
 drivers/iio/common/st_sensors/st_sensors_spi.c | 4 ++--
 drivers/iio/gyro/bmg160_i2c.c                  | 4 ++--
 drivers/iio/gyro/bmg160_spi.c                  | 4 ++--
 drivers/iio/gyro/mpu3050-i2c.c                 | 4 ++--
 drivers/iio/imu/bmi160/bmi160_i2c.c            | 4 ++--
 drivers/iio/imu/bmi160/bmi160_spi.c            | 4 ++--
 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c      | 4 ++--
 drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c      | 4 ++--
 drivers/iio/light/st_uvis25_i2c.c              | 4 ++--
 drivers/iio/light/st_uvis25_spi.c              | 4 ++--
 drivers/iio/magnetometer/bmc150_magn_spi.c     | 4 ++--
 13 files changed, 26 insertions(+), 26 deletions(-)
Signature · 1 line
2.20.1
#1 lore raw

PATCH v2 1/13 iio: accel: kxsd9: Use vsprintf extension %pe for symbolic error name

Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging.

---

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Based on conversations in [1] & [2].

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

---
 drivers/iio/accel/kxsd9-i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/accel/kxsd9-i2c.c +2 -2
index 38411e1c155b..b6f3de7ef8ea 100644
@@ -21,8 +21,8 @@ static int kxsd9_i2c_probe(struct i2c_client *i2c,
 
 	regmap = devm_regmap_init_i2c(i2c, &config);
 	if (IS_ERR(regmap)) {
-		dev_err(&i2c->dev, "Failed to register i2c regmap %d\n",
-			(int)PTR_ERR(regmap));
+		dev_err(&i2c->dev, "Failed to register i2c regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 
Signature · 1 line
2.20.1
#3 lore raw

PATCH v2 2/13 iio: st_sensors_i2c: Use vsprintf extension %pe for symbolic error name

In reply to Nishant Malpani

Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging.

---

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Based on conversations in [1] & [2].

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

---
 drivers/iio/common/st_sensors/st_sensors_i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/common/st_sensors/st_sensors_i2c.c +2 -2
index 286830fb5d35..4f7ae273ac98 100644
@@ -49,8 +49,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 (%d)\n",
-			(int)PTR_ERR(sdata->regmap));
+		dev_err(&client->dev, "Failed to register i2c regmap: %pe\n",
+			sdata->regmap);
 		return PTR_ERR(sdata->regmap);
 	}
 
Signature · 1 line
2.20.1
#5 lore raw

PATCH v2 3/13 iio: st_sensors_spi: Use vsprintf extension %pe for symbolic error name

In reply to Nishant Malpani

Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging.

---

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Based on conversations in [1] & [2].

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

---
 drivers/iio/common/st_sensors/st_sensors_spi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/common/st_sensors/st_sensors_spi.c +2 -2
index 1275fb0eda31..efa93928b498 100644
@@ -101,8 +101,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 (%d)\n",
-			(int)PTR_ERR(sdata->regmap));
+		dev_err(&spi->dev, "Failed to register spi regmap: %pe\n",
+			sdata->regmap);
 		return PTR_ERR(sdata->regmap);
 	}
 
Signature · 1 line
2.20.1
#7 lore raw

PATCH v2 4/13 iio: gyro: bmg160_i2c: Use vsprintf extension %pe for symbolic error name

In reply to Nishant Malpani

Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging.

---

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Based on conversations in [1] & [2].

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

---
 drivers/iio/gyro/bmg160_i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/gyro/bmg160_i2c.c +2 -2
index 4fc9c6a3321f..513473fb2055 100644
@@ -21,8 +21,8 @@ static int bmg160_i2c_probe(struct i2c_client *client,
 
 	regmap = devm_regmap_init_i2c(client, &bmg160_regmap_i2c_conf);
 	if (IS_ERR(regmap)) {
-		dev_err(&client->dev, "Failed to register i2c regmap %d\n",
-			(int)PTR_ERR(regmap));
+		dev_err(&client->dev, "Failed to register i2c regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 
Signature · 1 line
2.20.1
#9 lore raw

PATCH v2 5/13 iio: gyro: bmg160_spi: Use vsprintf extension %pe for symbolic error name

In reply to Nishant Malpani

Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging.

---

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Based on conversations in [1] & [2].

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

---
 drivers/iio/gyro/bmg160_spi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/gyro/bmg160_spi.c +2 -2
index 182a59c42507..6f82bbe0ae92 100644
@@ -19,8 +19,8 @@ static int bmg160_spi_probe(struct spi_device *spi)
 
 	regmap = devm_regmap_init_spi(spi, &bmg160_regmap_spi_conf);
 	if (IS_ERR(regmap)) {
-		dev_err(&spi->dev, "Failed to register spi regmap %d\n",
-			(int)PTR_ERR(regmap));
+		dev_err(&spi->dev, "Failed to register spi regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 
Signature · 1 line
2.20.1
#11 lore raw

PATCH v2 6/13 iio: gyro: mpu3050: Use vsprintf extension %pe for symbolic error name

In reply to Nishant Malpani

Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging.

---

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Based on conversations in [1] & [2].

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

---
 drivers/iio/gyro/mpu3050-i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/gyro/mpu3050-i2c.c +2 -2
index afa8018b9238..ef5bcbc4b45b 100644
@@ -51,8 +51,8 @@ static int mpu3050_i2c_probe(struct i2c_client *client,
 
 	regmap = devm_regmap_init_i2c(client, &mpu3050_i2c_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(&client->dev, "Failed to register i2c regmap %d\n",
-			(int)PTR_ERR(regmap));
+		dev_err(&client->dev, "Failed to register i2c regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 
Signature · 1 line
2.20.1
#13 lore raw

PATCH v2 7/13 iio: imu: bmi160_i2c: Use vsprintf extension %pe for symbolic error name

In reply to Nishant Malpani

Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging.

---

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Based on conversations in [1] & [2].

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

---
 drivers/iio/imu/bmi160/bmi160_i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/imu/bmi160/bmi160_i2c.c +2 -2
index e36f5e82d400..26398614eddf 100644
@@ -24,8 +24,8 @@ static int bmi160_i2c_probe(struct i2c_client *client,
 
 	regmap = devm_regmap_init_i2c(client, &bmi160_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(&client->dev, "Failed to register i2c regmap %d\n",
-			(int)PTR_ERR(regmap));
+		dev_err(&client->dev, "Failed to register i2c regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 
Signature · 1 line
2.20.1
#15 lore raw

PATCH v2 8/13 iio: imu: bmi160_spi: Use vsprintf extension %pe for symbolic error name

In reply to Nishant Malpani

Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging.

---

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Based on conversations in [1] & [2].

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

---
 drivers/iio/imu/bmi160/bmi160_spi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/imu/bmi160/bmi160_spi.c +2 -2
index c19e3df35559..61389b41c6d9 100644
@@ -20,8 +20,8 @@ static int bmi160_spi_probe(struct spi_device *spi)
 
 	regmap = devm_regmap_init_spi(spi, &bmi160_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(&spi->dev, "Failed to register spi regmap %d\n",
-			(int)PTR_ERR(regmap));
+		dev_err(&spi->dev, "Failed to register spi regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 	return bmi160_core_probe(&spi->dev, regmap, id->name, true);
Signature · 1 line
2.20.1
#17 lore raw

PATCH v2 9/13 iio: imu: inv_mpu6050_i2c: Use vsprintf extension %pe for symbolic error name

In reply to Nishant Malpani

Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging.

---

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Based on conversations in [1] & [2].

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

---
 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c +2 -2
index 6993d3b87bb0..28cfae1e61cf 100644
@@ -122,8 +122,8 @@ static int inv_mpu_probe(struct i2c_client *client,
 
 	regmap = devm_regmap_init_i2c(client, &inv_mpu_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(&client->dev, "Failed to register i2c regmap %d\n",
-			(int)PTR_ERR(regmap));
+		dev_err(&client->dev, "Failed to register i2c regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 
Signature · 1 line
2.20.1
#19 lore raw

PATCH v2 10/13 iio: imu: inv_mpu6050_spi: Use vsprintf extension %pe for symbolic error name

In reply to Nishant Malpani

Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging.

---

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Based on conversations in [1] & [2].

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

---
 drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c +2 -2
index 673b198e6368..6f968ce687e1 100644
@@ -53,8 +53,8 @@ static int inv_mpu_probe(struct spi_device *spi)
 
 	regmap = devm_regmap_init_spi(spi, &inv_mpu_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(&spi->dev, "Failed to register spi regmap %d\n",
-			(int)PTR_ERR(regmap));
+		dev_err(&spi->dev, "Failed to register spi regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 
Signature · 1 line
2.20.1
#21 lore raw

PATCH v2 11/13 iio: light: st_uvis25_i2c: Use vsprintf extension %pe for symbolic error name

In reply to Nishant Malpani

Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging.

---

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Based on conversations in [1] & [2].

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

---
 drivers/iio/light/st_uvis25_i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/light/st_uvis25_i2c.c +2 -2
index 4889bbeb0c73..801f754bc1a5 100644
@@ -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 %d\n",
-			(int)PTR_ERR(regmap));
+		dev_err(&client->dev, "Failed to register i2c regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 
Signature · 1 line
2.20.1
#23 lore raw

PATCH v2 12/13 iio: light: st_uvis25_spi: Use vsprintf extension %pe for symbolic error name

In reply to Nishant Malpani

Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging.

---

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Based on conversations in [1] & [2].

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

---
 drivers/iio/light/st_uvis25_spi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/light/st_uvis25_spi.c +2 -2
index a9ceae4f58b3..ae57e80a2e8f 100644
@@ -31,8 +31,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 %d\n",
-			(int)PTR_ERR(regmap));
+		dev_err(&spi->dev, "Failed to register spi regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 
Signature · 1 line
2.20.1
#24 lore raw

PATCH v2 13/13 iio: magn: bmc150: Use vsprintf extension %pe for symbolic error name

In reply to Nishant Malpani

Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging.

---

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Based on conversations in [1] & [2].

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

---
 drivers/iio/magnetometer/bmc150_magn_spi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/magnetometer/bmc150_magn_spi.c +2 -2
index ed9be0490d77..c6ed3ea8460a 100644
@@ -22,8 +22,8 @@ static int bmc150_magn_spi_probe(struct spi_device *spi)
 
 	regmap = devm_regmap_init_spi(spi, &bmc150_magn_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(&spi->dev, "Failed to register spi regmap %d\n",
-			(int)PTR_ERR(regmap));
+		dev_err(&spi->dev, "Failed to register spi regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 	return bmc150_magn_probe(&spi->dev, regmap, spi->irq, id->name);
Signature · 1 line
2.20.1
maintainer
#2 lore raw

Re: [PATCH v2 01/13] iio: accel: kxsd9: Use vsprintf extension %pe for symbolic error name

In reply to Nishant Malpani
Quoted 6 lines · On Sun, 22 Mar 2020 22:53:03 +0530 Nishant Malpani <[email protected]>…

Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging.

Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it.

Thanks,

Jonathan

Quoted 29 lines

---

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Based on conversations in [1] & [2].

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

---
 drivers/iio/accel/kxsd9-i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/accel/kxsd9-i2c.c +2 -2
index 38411e1c155b..b6f3de7ef8ea 100644
@@ -21,8 +21,8 @@ static int kxsd9_i2c_probe(struct i2c_client *i2c,
 
 	regmap = devm_regmap_init_i2c(i2c, &config);
 	if (IS_ERR(regmap)) {
-		dev_err(&i2c->dev, "Failed to register i2c regmap %d\n",
-			(int)PTR_ERR(regmap));
+		dev_err(&i2c->dev, "Failed to register i2c regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 
maintainer
#4 lore raw

Re: [PATCH v2 02/13] iio: st_sensors_i2c: Use vsprintf extension %pe for symbolic error name

In reply to Nishant Malpani
Quoted 6 lines · On Sun, 22 Mar 2020 22:53:04 +0530 Nishant Malpani <[email protected]>…

Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging.

This one doesn't apply because the original 'fix' that the whole series was based on from Andy has already been applied.

Whilst you could propose a change on top of that it probably isn't worth the effort, so unless others disagree I'd just drop this one.

Thanks,

Jonathan

Quoted 29 lines

---

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Based on conversations in [1] & [2].

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

---
 drivers/iio/common/st_sensors/st_sensors_i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/common/st_sensors/st_sensors_i2c.c +2 -2
index 286830fb5d35..4f7ae273ac98 100644
@@ -49,8 +49,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 (%d)\n",
-			(int)PTR_ERR(sdata->regmap));
+		dev_err(&client->dev, "Failed to register i2c regmap: %pe\n",
+			sdata->regmap);
 		return PTR_ERR(sdata->regmap);
 	}
 
maintainer
#6 lore raw

Re: [PATCH v2 03/13] iio: st_sensors_spi: Use vsprintf extension %pe for symbolic error name

In reply to Nishant Malpani
Quoted 6 lines · On Sun, 22 Mar 2020 22:53:05 +0530 Nishant Malpani <[email protected]>…

Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging.

Same comment as for the previous patch.

Thanks,

J

Quoted 29 lines

---

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Based on conversations in [1] & [2].

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

---
 drivers/iio/common/st_sensors/st_sensors_spi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/common/st_sensors/st_sensors_spi.c +2 -2
index 1275fb0eda31..efa93928b498 100644
@@ -101,8 +101,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 (%d)\n",
-			(int)PTR_ERR(sdata->regmap));
+		dev_err(&spi->dev, "Failed to register spi regmap: %pe\n",
+			sdata->regmap);
 		return PTR_ERR(sdata->regmap);
 	}
 
maintainer Applied
#8 lore raw

Re: [PATCH v2 04/13] iio: gyro: bmg160_i2c: Use vsprintf extension %pe for symbolic error name

In reply to Nishant Malpani
Quoted 6 lines · On Sun, 22 Mar 2020 22:53:06 +0530 Nishant Malpani <[email protected]>…

Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging.

Applied

Thanks,

Jonathan

Quoted 29 lines

---

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Based on conversations in [1] & [2].

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

---
 drivers/iio/gyro/bmg160_i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/gyro/bmg160_i2c.c +2 -2
index 4fc9c6a3321f..513473fb2055 100644
@@ -21,8 +21,8 @@ static int bmg160_i2c_probe(struct i2c_client *client,
 
 	regmap = devm_regmap_init_i2c(client, &bmg160_regmap_i2c_conf);
 	if (IS_ERR(regmap)) {
-		dev_err(&client->dev, "Failed to register i2c regmap %d\n",
-			(int)PTR_ERR(regmap));
+		dev_err(&client->dev, "Failed to register i2c regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 
maintainer Applied
#10 lore raw

Re: [PATCH v2 05/13] iio: gyro: bmg160_spi: Use vsprintf extension %pe for symbolic error name

In reply to Nishant Malpani
Quoted 6 lines · On Sun, 22 Mar 2020 22:53:07 +0530 Nishant Malpani <[email protected]>…

Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging.

Side note on this one. Would have made sense to combine the two patches for the bmg160 gyro into one, but doesn't really matter.

Applied.

Thanks,

Quoted 29 lines

---

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Based on conversations in [1] & [2].

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

---
 drivers/iio/gyro/bmg160_spi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/gyro/bmg160_spi.c +2 -2
index 182a59c42507..6f82bbe0ae92 100644
@@ -19,8 +19,8 @@ static int bmg160_spi_probe(struct spi_device *spi)
 
 	regmap = devm_regmap_init_spi(spi, &bmg160_regmap_spi_conf);
 	if (IS_ERR(regmap)) {
-		dev_err(&spi->dev, "Failed to register spi regmap %d\n",
-			(int)PTR_ERR(regmap));
+		dev_err(&spi->dev, "Failed to register spi regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 
maintainer Applied
#12 lore raw

Re: [PATCH v2 06/13] iio: gyro: mpu3050: Use vsprintf extension %pe for symbolic error name

In reply to Nishant Malpani
Quoted 6 lines · On Sun, 22 Mar 2020 22:53:08 +0530 Nishant Malpani <[email protected]>…

Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging.

Applied.

Thanks,

Jonathan

Quoted 29 lines

---

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Based on conversations in [1] & [2].

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

---
 drivers/iio/gyro/mpu3050-i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/gyro/mpu3050-i2c.c +2 -2
index afa8018b9238..ef5bcbc4b45b 100644
@@ -51,8 +51,8 @@ static int mpu3050_i2c_probe(struct i2c_client *client,
 
 	regmap = devm_regmap_init_i2c(client, &mpu3050_i2c_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(&client->dev, "Failed to register i2c regmap %d\n",
-			(int)PTR_ERR(regmap));
+		dev_err(&client->dev, "Failed to register i2c regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 
maintainer Applied
#14 lore raw

Re: [PATCH v2 07/13] iio: imu: bmi160_i2c: Use vsprintf extension %pe for symbolic error name

In reply to Nishant Malpani
Quoted 6 lines · On Sun, 22 Mar 2020 22:53:09 +0530 Nishant Malpani <[email protected]>…

Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging.

Applied

Thanks,

J

Quoted 29 lines

---

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Based on conversations in [1] & [2].

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

---
 drivers/iio/imu/bmi160/bmi160_i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/imu/bmi160/bmi160_i2c.c +2 -2
index e36f5e82d400..26398614eddf 100644
@@ -24,8 +24,8 @@ static int bmi160_i2c_probe(struct i2c_client *client,
 
 	regmap = devm_regmap_init_i2c(client, &bmi160_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(&client->dev, "Failed to register i2c regmap %d\n",
-			(int)PTR_ERR(regmap));
+		dev_err(&client->dev, "Failed to register i2c regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 
maintainer Applied
#16 lore raw

Re: [PATCH v2 08/13] iio: imu: bmi160_spi: Use vsprintf extension %pe for symbolic error name

In reply to Nishant Malpani
Quoted 6 lines · On Sun, 22 Mar 2020 22:53:10 +0530 Nishant Malpani <[email protected]>…

Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging.

Applied,

Thanks,

Jonathan

Quoted 29 lines

---

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Based on conversations in [1] & [2].

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

---
 drivers/iio/imu/bmi160/bmi160_spi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/imu/bmi160/bmi160_spi.c +2 -2
index c19e3df35559..61389b41c6d9 100644
@@ -20,8 +20,8 @@ static int bmi160_spi_probe(struct spi_device *spi)
 
 	regmap = devm_regmap_init_spi(spi, &bmi160_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(&spi->dev, "Failed to register spi regmap %d\n",
-			(int)PTR_ERR(regmap));
+		dev_err(&spi->dev, "Failed to register spi regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 	return bmi160_core_probe(&spi->dev, regmap, id->name, true);
maintainer Applied
#18 lore raw

Re: [PATCH v2 09/13] iio: imu: inv_mpu6050_i2c: Use vsprintf extension %pe for symbolic error name

In reply to Nishant Malpani
Quoted 6 lines · On Sun, 22 Mar 2020 22:53:11 +0530 Nishant Malpani <[email protected]>…

Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging.

Applied,

Thanks,

J

Quoted 29 lines

---

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Based on conversations in [1] & [2].

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

---
 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c +2 -2
index 6993d3b87bb0..28cfae1e61cf 100644
@@ -122,8 +122,8 @@ static int inv_mpu_probe(struct i2c_client *client,
 
 	regmap = devm_regmap_init_i2c(client, &inv_mpu_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(&client->dev, "Failed to register i2c regmap %d\n",
-			(int)PTR_ERR(regmap));
+		dev_err(&client->dev, "Failed to register i2c regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 
maintainer Applied
#20 lore raw

Re: [PATCH v2 10/13] iio: imu: inv_mpu6050_spi: Use vsprintf extension %pe for symbolic error name

In reply to Nishant Malpani
Quoted 6 lines · On Sun, 22 Mar 2020 22:53:12 +0530 Nishant Malpani <[email protected]>…

Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging.

Applied,

Thanks,

J

Quoted 29 lines

---

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Based on conversations in [1] & [2].

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

---
 drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c +2 -2
index 673b198e6368..6f968ce687e1 100644
@@ -53,8 +53,8 @@ static int inv_mpu_probe(struct spi_device *spi)
 
 	regmap = devm_regmap_init_spi(spi, &inv_mpu_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(&spi->dev, "Failed to register spi regmap %d\n",
-			(int)PTR_ERR(regmap));
+		dev_err(&spi->dev, "Failed to register spi regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 
maintainer
#22 lore raw

Re: [PATCH v2 11/13] iio: light: st_uvis25_i2c: Use vsprintf extension %pe for symbolic error name

In reply to Nishant Malpani
Quoted 6 lines · On Sun, 22 Mar 2020 22:53:13 +0530 Nishant Malpani <[email protected]>…

Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging.

This one was already fixed up as well, so not applied.

Thanks,

Jonathan

Quoted 29 lines

---

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Based on conversations in [1] & [2].

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

---
 drivers/iio/light/st_uvis25_i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/light/st_uvis25_i2c.c +2 -2
index 4889bbeb0c73..801f754bc1a5 100644
@@ -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 %d\n",
-			(int)PTR_ERR(regmap));
+		dev_err(&client->dev, "Failed to register i2c regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 
maintainer Applied
#25 lore raw

Re: [PATCH v2 13/13] iio: magn: bmc150: Use vsprintf extension %pe for symbolic error name

In reply to Nishant Malpani
Quoted 6 lines · On Sun, 22 Mar 2020 22:53:15 +0530 Nishant Malpani <[email protected]>…

Utilize %pe format specifier from vsprintf while printing error logs with dev_err(). Discards the use of unnecessary explicit casting and prints symbolic error name which might prove to be convenient during debugging.

Applied,

Thanks,

Jonathan

Quoted 29 lines

---

Changes in v2:
- Rewrite commit subject line outlining the usage of %pe.
- Add a separator between regmap and its error name.

Based on conversations in [1] & [2].

[1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
[2] https://marc.info/?l=linux-iio&m=158481647605891&w=2

---
 drivers/iio/magnetometer/bmc150_magn_spi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/magnetometer/bmc150_magn_spi.c +2 -2
index ed9be0490d77..c6ed3ea8460a 100644
@@ -22,8 +22,8 @@ static int bmc150_magn_spi_probe(struct spi_device *spi)
 
 	regmap = devm_regmap_init_spi(spi, &bmc150_magn_regmap_config);
 	if (IS_ERR(regmap)) {
-		dev_err(&spi->dev, "Failed to register spi regmap %d\n",
-			(int)PTR_ERR(regmap));
+		dev_err(&spi->dev, "Failed to register spi regmap: %pe\n",
+			regmap);
 		return PTR_ERR(regmap);
 	}
 	return bmc150_magn_probe(&spi->dev, regmap, spi->irq, id->name);