From: Nishant Malpani Date: Sun, 22 Mar 2020 17:23:03 +0000 (+0530) Subject: iio: accel: kxsd9: Use vsprintf extension %pe for symbolic error name X-Git-Tag: v5.10.7~2410^2~255^2~70 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f0bd45fea3ea9c73040228bc95dd9a2ca74b2b17;p=platform%2Fkernel%2Flinux-rpi.git 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. Signed-off-by: Nishant Malpani Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/accel/kxsd9-i2c.c b/drivers/iio/accel/kxsd9-i2c.c index 38411e1..b6f3de7 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); }