From: Nishant Malpani Date: Sun, 22 Mar 2020 17:23:08 +0000 (+0530) Subject: iio: gyro: mpu3050: Use vsprintf extension %pe for symbolic error name X-Git-Tag: v5.15~3664^2~255^2~67 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e5fd387657abfed7da96edd8a313babb7f6a66a;p=platform%2Fkernel%2Flinux-starfive.git iio: gyro: mpu3050: 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/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); }