Skip to contentSkip to conversation

iio: light: gp2ap002: Drop unneeded explicit casting

PATCH Applied Andy Shevchenko 2 participants 2 messages Mar 12, 2021 – Mar 13, 2021

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

PATCH 1/1 iio: light: gp2ap002: Drop unneeded explicit casting

The unnecessary explicit casting is being used. Drop it for good.

---
 drivers/iio/light/gp2ap002.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/iio/light/gp2ap002.c +1 -2
index 7ba7aa59437c..d048ae257c51 100644
@@ -465,8 +465,7 @@ static int gp2ap002_probe(struct i2c_client *client,
 
 	regmap = devm_regmap_init(dev, &gp2ap002_regmap_bus, dev, &config);
 	if (IS_ERR(regmap)) {
-		dev_err(dev, "Failed to register i2c regmap %d\n",
-			(int)PTR_ERR(regmap));
+		dev_err(dev, "Failed to register i2c regmap %ld\n", PTR_ERR(regmap));
 		return PTR_ERR(regmap);
 	}
 	gp2ap002->map = regmap;
Signature · 1 line
2.30.1
maintainer Applied
#1 lore raw
Quoted 3 lines · On Fri, 12 Mar 2021 15:49:03 +0200 Andy Shevchenko…

The unnecessary explicit casting is being used. Drop it for good.

Applied to the togreg branch of iio.git.

These were all so simple I didn't wait for reviews, but if anyone wants to add any tags I can still do that as only pushed out as testing so far to give the autobuilders something to poke at.

Thanks,

Jonathan

Quoted 18 lines
---
 drivers/iio/light/gp2ap002.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/iio/light/gp2ap002.c +1 -2
index 7ba7aa59437c..d048ae257c51 100644
@@ -465,8 +465,7 @@ static int gp2ap002_probe(struct i2c_client *client,
 
 	regmap = devm_regmap_init(dev, &gp2ap002_regmap_bus, dev, &config);
 	if (IS_ERR(regmap)) {
-		dev_err(dev, "Failed to register i2c regmap %d\n",
-			(int)PTR_ERR(regmap));
+		dev_err(dev, "Failed to register i2c regmap %ld\n", PTR_ERR(regmap));
 		return PTR_ERR(regmap);
 	}
 	gp2ap002->map = regmap;