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.
Suggested-by: Joe Perches <[email protected]>
Suggested-by: Andy Shevchenko <[email protected]>
Suggested-by: Jonathan Cameron <[email protected]>
[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(-)
--
2.20.1
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.
Signed-off-by: Nishant Malpani <[email protected]>
---
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(-)
diff --git a/drivers/iio/accel/kxsd9-i2c.c b/drivers/iio/accel/kxsd9-i2c.c
index 38411e1c155b..b6f3de7ef8ea 100644
--- a/drivers/iio/accel/kxsd9-i2c.c
+++ b/drivers/iio/accel/kxsd9-i2c.c
@@ -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);
}
--
2.20.1
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.
Signed-off-by: Nishant Malpani <[email protected]>
---
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(-)
diff --git a/drivers/iio/common/st_sensors/st_sensors_i2c.c b/drivers/iio/common/st_sensors/st_sensors_i2c.c
index 286830fb5d35..4f7ae273ac98 100644
--- a/drivers/iio/common/st_sensors/st_sensors_i2c.c
+++ b/drivers/iio/common/st_sensors/st_sensors_i2c.c
@@ -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);
}
--
2.20.1
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.
Signed-off-by: Nishant Malpani <[email protected]>
---
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(-)
diff --git a/drivers/iio/gyro/bmg160_i2c.c b/drivers/iio/gyro/bmg160_i2c.c
index 4fc9c6a3321f..513473fb2055 100644
--- a/drivers/iio/gyro/bmg160_i2c.c
+++ b/drivers/iio/gyro/bmg160_i2c.c
@@ -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);
}
--
2.20.1
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.
Signed-off-by: Nishant Malpani <[email protected]>
---
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(-)
diff --git a/drivers/iio/common/st_sensors/st_sensors_spi.c b/drivers/iio/common/st_sensors/st_sensors_spi.c
index 1275fb0eda31..efa93928b498 100644
--- a/drivers/iio/common/st_sensors/st_sensors_spi.c
+++ b/drivers/iio/common/st_sensors/st_sensors_spi.c
@@ -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);
}
--
2.20.1
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.
Signed-off-by: Nishant Malpani <[email protected]>
---
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(-)
diff --git a/drivers/iio/gyro/bmg160_spi.c b/drivers/iio/gyro/bmg160_spi.c
index 182a59c42507..6f82bbe0ae92 100644
--- a/drivers/iio/gyro/bmg160_spi.c
+++ b/drivers/iio/gyro/bmg160_spi.c
@@ -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);
}
--
2.20.1
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.
Signed-off-by: Nishant Malpani <[email protected]>
---
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(-)
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c
index 673b198e6368..6f968ce687e1 100644
--- a/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c
+++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c
@@ -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);
}
--
2.20.1
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.
Signed-off-by: Nishant Malpani <[email protected]>
---
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(-)
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
index 6993d3b87bb0..28cfae1e61cf 100644
--- a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
+++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
@@ -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);
}
--
2.20.1
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.
Signed-off-by: Nishant Malpani <[email protected]>
---
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(-)
diff --git a/drivers/iio/gyro/mpu3050-i2c.c b/drivers/iio/gyro/mpu3050-i2c.c
index afa8018b9238..ef5bcbc4b45b 100644
--- a/drivers/iio/gyro/mpu3050-i2c.c
+++ b/drivers/iio/gyro/mpu3050-i2c.c
@@ -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);
}
--
2.20.1
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.
Signed-off-by: Nishant Malpani <[email protected]>
---
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(-)
diff --git a/drivers/iio/light/st_uvis25_spi.c b/drivers/iio/light/st_uvis25_spi.c
index a9ceae4f58b3..ae57e80a2e8f 100644
--- a/drivers/iio/light/st_uvis25_spi.c
+++ b/drivers/iio/light/st_uvis25_spi.c
@@ -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);
}
--
2.20.1
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.
Signed-off-by: Nishant Malpani <[email protected]>
---
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(-)
diff --git a/drivers/iio/magnetometer/bmc150_magn_spi.c b/drivers/iio/magnetometer/bmc150_magn_spi.c
index ed9be0490d77..c6ed3ea8460a 100644
--- a/drivers/iio/magnetometer/bmc150_magn_spi.c
+++ b/drivers/iio/magnetometer/bmc150_magn_spi.c
@@ -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);
--
2.20.1
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.
Signed-off-by: Nishant Malpani <[email protected]>
---
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(-)
diff --git a/drivers/iio/imu/bmi160/bmi160_i2c.c b/drivers/iio/imu/bmi160/bmi160_i2c.c
index e36f5e82d400..26398614eddf 100644
--- a/drivers/iio/imu/bmi160/bmi160_i2c.c
+++ b/drivers/iio/imu/bmi160/bmi160_i2c.c
@@ -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);
}
--
2.20.1
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.
Signed-off-by: Nishant Malpani <[email protected]>
---
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(-)
diff --git a/drivers/iio/imu/bmi160/bmi160_spi.c b/drivers/iio/imu/bmi160/bmi160_spi.c
index c19e3df35559..61389b41c6d9 100644
--- a/drivers/iio/imu/bmi160/bmi160_spi.c
+++ b/drivers/iio/imu/bmi160/bmi160_spi.c
@@ -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);
--
2.20.1
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.
Signed-off-by: Nishant Malpani <[email protected]>
---
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(-)
diff --git a/drivers/iio/light/st_uvis25_i2c.c b/drivers/iio/light/st_uvis25_i2c.c
index 4889bbeb0c73..801f754bc1a5 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 %d\n",
- (int)PTR_ERR(regmap));
+ dev_err(&client->dev, "Failed to register i2c regmap: %pe\n",
+ regmap);
return PTR_ERR(regmap);
}
--
2.20.1
On Sun, 22 Mar 2020 22:53:03 +0530
Nishant Malpani <[email protected]> wrote:
> 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.
>
> Signed-off-by: Nishant Malpani <[email protected]>
Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to play with it.
Thanks,
Jonathan
> ---
>
> 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(-)
>
> diff --git a/drivers/iio/accel/kxsd9-i2c.c b/drivers/iio/accel/kxsd9-i2c.c
> index 38411e1c155b..b6f3de7ef8ea 100644
> --- a/drivers/iio/accel/kxsd9-i2c.c
> +++ b/drivers/iio/accel/kxsd9-i2c.c
> @@ -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);
> }
>
On Sun, 22 Mar 2020 22:53:04 +0530
Nishant Malpani <[email protected]> wrote:
> 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.
>
> Signed-off-by: Nishant Malpani <[email protected]>
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
> ---
>
> 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(-)
>
> diff --git a/drivers/iio/common/st_sensors/st_sensors_i2c.c b/drivers/iio/common/st_sensors/st_sensors_i2c.c
> index 286830fb5d35..4f7ae273ac98 100644
> --- a/drivers/iio/common/st_sensors/st_sensors_i2c.c
> +++ b/drivers/iio/common/st_sensors/st_sensors_i2c.c
> @@ -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);
> }
>
On Sun, 22 Mar 2020 22:53:05 +0530
Nishant Malpani <[email protected]> wrote:
> 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.
>
> Signed-off-by: Nishant Malpani <[email protected]>
Same comment as for the previous patch.
Thanks,
J
> ---
>
> 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(-)
>
> diff --git a/drivers/iio/common/st_sensors/st_sensors_spi.c b/drivers/iio/common/st_sensors/st_sensors_spi.c
> index 1275fb0eda31..efa93928b498 100644
> --- a/drivers/iio/common/st_sensors/st_sensors_spi.c
> +++ b/drivers/iio/common/st_sensors/st_sensors_spi.c
> @@ -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);
> }
>
On Sun, 22 Mar 2020 22:53:06 +0530
Nishant Malpani <[email protected]> wrote:
> 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.
>
> Signed-off-by: Nishant Malpani <[email protected]>
Applied
Thanks,
Jonathan
> ---
>
> 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(-)
>
> diff --git a/drivers/iio/gyro/bmg160_i2c.c b/drivers/iio/gyro/bmg160_i2c.c
> index 4fc9c6a3321f..513473fb2055 100644
> --- a/drivers/iio/gyro/bmg160_i2c.c
> +++ b/drivers/iio/gyro/bmg160_i2c.c
> @@ -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);
> }
>
On Sun, 22 Mar 2020 22:53:07 +0530
Nishant Malpani <[email protected]> wrote:
> 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.
>
> Signed-off-by: Nishant Malpani <[email protected]>
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,
> ---
>
> 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(-)
>
> diff --git a/drivers/iio/gyro/bmg160_spi.c b/drivers/iio/gyro/bmg160_spi.c
> index 182a59c42507..6f82bbe0ae92 100644
> --- a/drivers/iio/gyro/bmg160_spi.c
> +++ b/drivers/iio/gyro/bmg160_spi.c
> @@ -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);
> }
>
On Sun, 22 Mar 2020 22:53:08 +0530
Nishant Malpani <[email protected]> wrote:
> 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.
>
> Signed-off-by: Nishant Malpani <[email protected]>
Applied.
Thanks,
Jonathan
> ---
>
> 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(-)
>
> diff --git a/drivers/iio/gyro/mpu3050-i2c.c b/drivers/iio/gyro/mpu3050-i2c.c
> index afa8018b9238..ef5bcbc4b45b 100644
> --- a/drivers/iio/gyro/mpu3050-i2c.c
> +++ b/drivers/iio/gyro/mpu3050-i2c.c
> @@ -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);
> }
>
On Sun, 22 Mar 2020 22:53:09 +0530
Nishant Malpani <[email protected]> wrote:
> 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.
>
> Signed-off-by: Nishant Malpani <[email protected]>
Applied
Thanks,
J
> ---
>
> 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(-)
>
> diff --git a/drivers/iio/imu/bmi160/bmi160_i2c.c b/drivers/iio/imu/bmi160/bmi160_i2c.c
> index e36f5e82d400..26398614eddf 100644
> --- a/drivers/iio/imu/bmi160/bmi160_i2c.c
> +++ b/drivers/iio/imu/bmi160/bmi160_i2c.c
> @@ -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);
> }
>
On Sun, 22 Mar 2020 22:53:10 +0530
Nishant Malpani <[email protected]> wrote:
> 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.
>
> Signed-off-by: Nishant Malpani <[email protected]>
Applied,
Thanks,
Jonathan
> ---
>
> 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(-)
>
> diff --git a/drivers/iio/imu/bmi160/bmi160_spi.c b/drivers/iio/imu/bmi160/bmi160_spi.c
> index c19e3df35559..61389b41c6d9 100644
> --- a/drivers/iio/imu/bmi160/bmi160_spi.c
> +++ b/drivers/iio/imu/bmi160/bmi160_spi.c
> @@ -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);
On Sun, 22 Mar 2020 22:53:12 +0530
Nishant Malpani <[email protected]> wrote:
> 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.
>
> Signed-off-by: Nishant Malpani <[email protected]>
Applied,
Thanks,
J
> ---
>
> 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(-)
>
> diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c
> index 673b198e6368..6f968ce687e1 100644
> --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c
> +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c
> @@ -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);
> }
>
On Sun, 22 Mar 2020 22:53:11 +0530
Nishant Malpani <[email protected]> wrote:
> 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.
>
> Signed-off-by: Nishant Malpani <[email protected]>
Applied,
Thanks,
J
> ---
>
> 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(-)
>
> diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
> index 6993d3b87bb0..28cfae1e61cf 100644
> --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
> +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
> @@ -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);
> }
>
On Sun, 22 Mar 2020 22:53:13 +0530
Nishant Malpani <[email protected]> wrote:
> 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.
>
> Signed-off-by: Nishant Malpani <[email protected]>
This one was already fixed up as well, so not applied.
Thanks,
Jonathan
> ---
>
> 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(-)
>
> diff --git a/drivers/iio/light/st_uvis25_i2c.c b/drivers/iio/light/st_uvis25_i2c.c
> index 4889bbeb0c73..801f754bc1a5 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 %d\n",
> - (int)PTR_ERR(regmap));
> + dev_err(&client->dev, "Failed to register i2c regmap: %pe\n",
> + regmap);
> return PTR_ERR(regmap);
> }
>
On Sun, 22 Mar 2020 22:53:15 +0530
Nishant Malpani <[email protected]> wrote:
> 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.
>
> Signed-off-by: Nishant Malpani <[email protected]>
Applied,
Thanks,
Jonathan
> ---
>
> 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(-)
>
> diff --git a/drivers/iio/magnetometer/bmc150_magn_spi.c b/drivers/iio/magnetometer/bmc150_magn_spi.c
> index ed9be0490d77..c6ed3ea8460a 100644
> --- a/drivers/iio/magnetometer/bmc150_magn_spi.c
> +++ b/drivers/iio/magnetometer/bmc150_magn_spi.c
> @@ -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);