iio: imu: fxos8700: Drop unneeded explicit castings
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 12 Mar 2021 13:45:38 +0000 (15:45 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 25 Mar 2021 19:13:50 +0000 (19:13 +0000)
In a few places the unnecessary explicit castings are being used.
Drop them for good.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210312134538.3759-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/fxos8700_i2c.c
drivers/iio/imu/fxos8700_spi.c

index 3ceb763..40a5703 100644 (file)
@@ -26,8 +26,7 @@ static int fxos8700_i2c_probe(struct i2c_client *client,
 
        regmap = devm_regmap_init_i2c(client, &fxos8700_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 57e7bb6..27e694c 100644 (file)
@@ -17,8 +17,7 @@ static int fxos8700_spi_probe(struct spi_device *spi)
 
        regmap = devm_regmap_init_spi(spi, &fxos8700_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);
        }