Use vsprintf extension %pe for symbolic error
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
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
@@ -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
Jonathan Cameron
maintainerRe: [PATCH v2 01/13] iio: accel: kxsd9: Use vsprintf extension %pe for symbolic error name
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.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
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@@ -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); }
PATCH v2 2/13 iio: st_sensors_i2c: Use vsprintf extension %pe for symbolic error name
In reply to Nishant MalpaniUtilize %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
@@ -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
Jonathan Cameron
maintainerRe: [PATCH v2 02/13] iio: st_sensors_i2c: Use vsprintf extension %pe for symbolic error name
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.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
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@@ -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); }
PATCH v2 3/13 iio: st_sensors_spi: Use vsprintf extension %pe for symbolic error name
In reply to Nishant MalpaniUtilize %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
@@ -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
Jonathan Cameron
maintainerRe: [PATCH v2 03/13] iio: st_sensors_spi: Use vsprintf extension %pe for symbolic error name
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.Signed-off-by Nishant Malpani <[email protected]>
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@@ -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); }
PATCH v2 4/13 iio: gyro: bmg160_i2c: Use vsprintf extension %pe for symbolic error name
In reply to Nishant MalpaniUtilize %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
@@ -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
Re: [PATCH v2 04/13] iio: gyro: bmg160_i2c: Use vsprintf extension %pe for symbolic error name
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.Signed-off-by Nishant Malpani <[email protected]>
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@@ -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); }
PATCH v2 5/13 iio: gyro: bmg160_spi: Use vsprintf extension %pe for symbolic error name
In reply to Nishant MalpaniUtilize %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
@@ -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
Re: [PATCH v2 05/13] iio: gyro: bmg160_spi: Use vsprintf extension %pe for symbolic error name
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.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,
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@@ -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); }
PATCH v2 6/13 iio: gyro: mpu3050: Use vsprintf extension %pe for symbolic error name
In reply to Nishant MalpaniUtilize %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
@@ -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
Re: [PATCH v2 06/13] iio: gyro: mpu3050: Use vsprintf extension %pe for symbolic error name
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.Signed-off-by Nishant Malpani <[email protected]>
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@@ -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); }
PATCH v2 7/13 iio: imu: bmi160_i2c: Use vsprintf extension %pe for symbolic error name
In reply to Nishant MalpaniUtilize %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
@@ -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
Re: [PATCH v2 07/13] iio: imu: bmi160_i2c: Use vsprintf extension %pe for symbolic error name
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.Signed-off-by Nishant Malpani <[email protected]>
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@@ -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); }
PATCH v2 8/13 iio: imu: bmi160_spi: Use vsprintf extension %pe for symbolic error name
In reply to Nishant MalpaniUtilize %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
@@ -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
Re: [PATCH v2 08/13] iio: imu: bmi160_spi: Use vsprintf extension %pe for symbolic error name
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.Signed-off-by Nishant Malpani <[email protected]>
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@@ -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);
PATCH v2 9/13 iio: imu: inv_mpu6050_i2c: Use vsprintf extension %pe for symbolic error name
In reply to Nishant MalpaniUtilize %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
@@ -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
Re: [PATCH v2 09/13] iio: imu: inv_mpu6050_i2c: Use vsprintf extension %pe for symbolic error name
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.Signed-off-by Nishant Malpani <[email protected]>
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@@ -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); }
PATCH v2 10/13 iio: imu: inv_mpu6050_spi: Use vsprintf extension %pe for symbolic error name
In reply to Nishant MalpaniUtilize %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
@@ -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
Re: [PATCH v2 10/13] iio: imu: inv_mpu6050_spi: Use vsprintf extension %pe for symbolic error name
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.Signed-off-by Nishant Malpani <[email protected]>
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@@ -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); }
PATCH v2 11/13 iio: light: st_uvis25_i2c: Use vsprintf extension %pe for symbolic error name
In reply to Nishant MalpaniUtilize %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
@@ -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
Jonathan Cameron
maintainerRe: [PATCH v2 11/13] iio: light: st_uvis25_i2c: Use vsprintf extension %pe for symbolic error name
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.Signed-off-by Nishant Malpani <[email protected]>
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@@ -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); }
PATCH v2 12/13 iio: light: st_uvis25_spi: Use vsprintf extension %pe for symbolic error name
In reply to Nishant MalpaniUtilize %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
@@ -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
PATCH v2 13/13 iio: magn: bmc150: Use vsprintf extension %pe for symbolic error name
In reply to Nishant MalpaniUtilize %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
@@ -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
Re: [PATCH v2 13/13] iio: magn: bmc150: Use vsprintf extension %pe for symbolic error name
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.Signed-off-by Nishant Malpani <[email protected]>
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@@ -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);