lkml.org 
[lkml]   [2020]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6] gpio: pca953x: Add Maxim MAX7313 PWM support
On Sat, Jul 04, 2020 at 02:23:09PM +0300, Andy Shevchenko wrote:
> On Fri, Jul 3, 2020 at 5:53 PM Uwe Kleine-König
> <u.kleine-koenig@pengutronix.de> wrote:
> > On Sun, May 03, 2020 at 12:54:53PM +0200, Miquel Raynal wrote:
>
> ...
>
> > > + ret = regmap_read(pca_chip->regmap, reg, &val);
> > > + mutex_unlock(&pca_chip->i2c_lock);
> > > + if (ret < 0) {
> > > + dev_err(dev, "Cannot retrieve PWM intensity (%d)\n", ret);
> >
> > Please use %pe for error codes.
>
> %pe is mainly for error pointers, with plain integers it will look
> awkward a bit.

Yeah, the right usage is:

dev_err(dev, "Cannot retrieve PWM intensity (%pe)\n", ERR_PTR(ret));

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-07-04 17:46    [W:0.067 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site