* [PATCH v1 1/1] iio: imu: fxos8700: Drop unneeded explicit castings
@ 2021-03-12 13:45 Andy Shevchenko
2021-03-13 15:10 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2021-03-12 13:45 UTC (permalink / raw)
To: Andy Shevchenko, linux-iio, linux-kernel
Cc: Jonathan Cameron, Lars-Peter Clausen, Peter Meerwald-Stadler
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>
---
drivers/iio/imu/fxos8700_i2c.c | 3 +--
drivers/iio/imu/fxos8700_spi.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/iio/imu/fxos8700_i2c.c b/drivers/iio/imu/fxos8700_i2c.c
index 3ceb76366313..40a570325b0a 100644
--- a/drivers/iio/imu/fxos8700_i2c.c
+++ b/drivers/iio/imu/fxos8700_i2c.c
@@ -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);
}
diff --git a/drivers/iio/imu/fxos8700_spi.c b/drivers/iio/imu/fxos8700_spi.c
index 57e7bb6444e7..27e694cce173 100644
--- a/drivers/iio/imu/fxos8700_spi.c
+++ b/drivers/iio/imu/fxos8700_spi.c
@@ -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);
}
--
2.30.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1 1/1] iio: imu: fxos8700: Drop unneeded explicit castings
2021-03-12 13:45 [PATCH v1 1/1] iio: imu: fxos8700: Drop unneeded explicit castings Andy Shevchenko
@ 2021-03-13 15:10 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2021-03-13 15:10 UTC (permalink / raw)
To: Andy Shevchenko
Cc: linux-iio, linux-kernel, Lars-Peter Clausen,
Peter Meerwald-Stadler
On Fri, 12 Mar 2021 15:45:38 +0200
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> 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>
Applied, Thanks
> ---
> drivers/iio/imu/fxos8700_i2c.c | 3 +--
> drivers/iio/imu/fxos8700_spi.c | 3 +--
> 2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/iio/imu/fxos8700_i2c.c b/drivers/iio/imu/fxos8700_i2c.c
> index 3ceb76366313..40a570325b0a 100644
> --- a/drivers/iio/imu/fxos8700_i2c.c
> +++ b/drivers/iio/imu/fxos8700_i2c.c
> @@ -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);
> }
>
> diff --git a/drivers/iio/imu/fxos8700_spi.c b/drivers/iio/imu/fxos8700_spi.c
> index 57e7bb6444e7..27e694cce173 100644
> --- a/drivers/iio/imu/fxos8700_spi.c
> +++ b/drivers/iio/imu/fxos8700_spi.c
> @@ -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);
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-13 15:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-12 13:45 [PATCH v1 1/1] iio: imu: fxos8700: Drop unneeded explicit castings Andy Shevchenko
2021-03-13 15:10 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).