iio: light: st_uvis25: Drop unneeded casting when print error code
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 13 Mar 2020 10:49:48 +0000 (12:49 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 21 Mar 2020 10:25:59 +0000 (10:25 +0000)
Explicit casting in printf() usually shows that something is not okay.
Here, we really don't need it by providing correct specifier.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/st_uvis25_i2c.c
drivers/iio/light/st_uvis25_spi.c

index 4889bbeb0c735fe8323da0e87c18fe8fde0c995c..400724069d1910554be7e3dadc5e7f34e40c27f2 100644 (file)
@@ -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 %ld\n",
+                       PTR_ERR(regmap));
                return PTR_ERR(regmap);
        }
 
index a9ceae4f58b3da30b575c45f248b8c8b4bc232b2..cd3761a3ee3f4aaf09f20b69b4b69a2509559d2f 100644 (file)
@@ -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 %ld\n",
+                       PTR_ERR(regmap));
                return PTR_ERR(regmap);
        }