]> git.baikalelectronics.ru Git - kernel.git/commitdiff
iio: humidity: hts221: Drop unneeded casting when print error code
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 13 Mar 2020 10:49:55 +0000 (12:49 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 21 Mar 2020 10:27:15 +0000 (10:27 +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/humidity/hts221_i2c.c
drivers/iio/humidity/hts221_spi.c

index 1398794e4bc756024471fa796b3cff7d9cb69151..cab39c4756f8ea6a05d1a18ff753367ed84acacd 100644 (file)
@@ -32,8 +32,8 @@ static int hts221_i2c_probe(struct i2c_client *client,
 
        regmap = devm_regmap_init_i2c(client, &hts221_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 ba1115489c2c9f51138a7ce2d35ad418bd5ae52e..729e86e433b1fd20311c92695f99e6dfbfe581d5 100644 (file)
@@ -31,8 +31,8 @@ static int hts221_spi_probe(struct spi_device *spi)
 
        regmap = devm_regmap_init_spi(spi, &hts221_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);
        }