linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	linux-iio@vger.kernel.org, Denis Ciocca <denis.ciocca@st.com>,
	Rohit Sarkar <rohitsarkar5398@gmail.com>,
	Nishant Malpani <nish.malpani25@gmail.com>
Subject: Re: [PATCH v2 1/8] iio: light: st_uvis25: Drop unneeded casting when print error code
Date: Sun, 15 Mar 2020 12:31:54 +0000	[thread overview]
Message-ID: <20200315123154.48bddabb@archlinux> (raw)
In-Reply-To: <20200315122609.31ab6673@archlinux>

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

> On Fri, 13 Mar 2020 12:49:48 +0200
> Andy Shevchenko <andriy.shevchenko@linux.intel.com> 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@linux.intel.com>  
> 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);
> >  	}
> >    
> 


      reply	other threads:[~2020-03-15 12:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-13 10:49 [PATCH v2 1/8] iio: light: st_uvis25: Drop unneeded casting when print error code Andy Shevchenko
2020-03-13 10:49 ` [PATCH v2 2/8] iio: st_sensors: Use dev_get_platdata() to get platform_data Andy Shevchenko
2020-03-15 12:34   ` Jonathan Cameron
2020-03-13 10:49 ` [PATCH v2 3/8] iio: st_sensors: Drop unneeded explicit castings Andy Shevchenko
2020-03-15 12:38   ` Jonathan Cameron
2020-03-13 10:49 ` [PATCH v2 4/8] iio: st_sensors: Drop unneeded casting when print error code Andy Shevchenko
2020-03-15 12:40   ` Jonathan Cameron
2020-03-13 10:49 ` [PATCH v2 5/8] iio: st_sensors: Join string literals back Andy Shevchenko
2020-03-15 12:40   ` Jonathan Cameron
2020-03-13 10:49 ` [PATCH v2 6/8] iio: humidity: hts221: Use dev_get_platdata() to get platform_data Andy Shevchenko
2020-03-15 12:42   ` Jonathan Cameron
2020-03-13 10:49 ` [PATCH v2 7/8] iio: humidity: hts221: Make use of device properties Andy Shevchenko
2020-03-15 12:43   ` Jonathan Cameron
2020-03-13 10:49 ` [PATCH v2 8/8] iio: humidity: hts221: Drop unneeded casting when print error code Andy Shevchenko
2020-03-15 12:44   ` Jonathan Cameron
2020-03-16  8:27     ` Andy Shevchenko
2020-03-15 12:26 ` [PATCH v2 1/8] iio: light: st_uvis25: " Jonathan Cameron
2020-03-15 12:31   ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200315123154.48bddabb@archlinux \
    --to=jic23@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=denis.ciocca@st.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=nish.malpani25@gmail.com \
    --cc=pmeerw@pmeerw.net \
    --cc=rohitsarkar5398@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).