lkml.org 
[lkml]   [2022]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store()
On Tue, Jun 28, 2022 at 10:47:10AM +0100, Lee Jones wrote:
> On Tue, 28 Jun 2022, Andy Shevchenko wrote:
> > On Mon, Jun 27, 2022 at 10:05:07AM +0100, Lee Jones wrote:
> > > On Thu, 16 Jun 2022, Andy Shevchenko wrote:

...

> > > > + ret = kstrtoul(buf, 0, &bxtwc_reg_addr);
> > > > + if (ret) {
> > > > dev_err(dev, "Invalid register address\n");
> > >
> > > Is that really what failure means, on every failure?
> > >
> > > "Returns 0 on success, -ERANGE on overflow and -EINVAL on parsing
> > > error."
> >
> > As far as I can see in either case the address is invalid.
> > Basically we may drop this confusing error message here, if
> > this what you prefer.
>
> Your call. I just wanted you to consider it for a moment.

Userspace will print an error based on the error code, so
I would rather remove _this_ message since it doesn't add
value, esp. when we could have -ERANGE.

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2022-06-28 12:39    [W:0.050 / U:0.980 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site