Re: [PATCH v2 1/8] iio: light: st_uvis25: Drop unneeded casting when print error code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 15 Mar 2020 12:26:09 +0000
Jonathan Cameron <jic23@xxxxxxxxxx> wrote:

> On Fri, 13 Mar 2020 12:49:48 +0200
> Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> 
> > 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@xxxxxxxxxxxxxxx>  
> Applied to the togreg branch of iio.git.  
> 

+CC Rohit and Nishant

On that note.  Cleaning other cases of this out sounds like good and
useful work for those who have asked recently.

git grep -A 4 dev_err  -- drivers/iio/ | grep \(int\)

Gives a few likely places to look.

If not I'll sweep up the lot in a week or so as clearly been some
cut and paste going on here and I'd rather it didn't happen again.

Thanks,

Jonathan

> thanks,
> 
> Jonathan
> 
> > ---
> > v2: no change
> >  drivers/iio/light/st_uvis25_i2c.c | 4 ++--
> >  drivers/iio/light/st_uvis25_spi.c | 4 ++--
> >  2 files changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/iio/light/st_uvis25_i2c.c b/drivers/iio/light/st_uvis25_i2c.c
> > index 4889bbeb0c73..400724069d19 100644
> > --- a/drivers/iio/light/st_uvis25_i2c.c
> > +++ b/drivers/iio/light/st_uvis25_i2c.c
> > @@ -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);
> >  	}
> >  
> > diff --git a/drivers/iio/light/st_uvis25_spi.c b/drivers/iio/light/st_uvis25_spi.c
> > index a9ceae4f58b3..cd3761a3ee3f 100644
> > --- a/drivers/iio/light/st_uvis25_spi.c
> > +++ b/drivers/iio/light/st_uvis25_spi.c
> > @@ -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);
> >  	}
> >    
> 




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux