From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: David Lechner <dlechner@baylibre.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>, "Chris Hall" <c-hall@ti.com>,
"Patrick Edwards" <pedwards@ti.com>,
"Kurt Borja" <kuurtb@gmail.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] iio: adc: ti-ads112c14: add burnout current support
Date: Tue, 1 Sep 2026 09:51:39 +0300 [thread overview]
Message-ID: <apZ1-9WHcIynqmXS@ashevche-desk.local> (raw)
In-Reply-To: <70c2d36d-b079-411f-a454-a62061e395cf@baylibre.com>
On Mon, Aug 31, 2026 at 04:14:47PM -0500, David Lechner wrote:
> On 8/28/26 2:38 AM, Andy Shevchenko wrote:
> > On Thu, Aug 27, 2026 at 05:27:02PM -0500, David Lechner (TI) wrote:
...
> >> + return dev_err_probe(dev, -EINVAL,
> >
> > I would use different error code, EINVAL is abused and overloaded a lot in the
> > kernel, and basically errors like ENODEV and EINVAL are synonyms to "*an* error"
> > happened. Unfortunately, reading the errno*.h I haven't found anything better.
>
> There is an error message to disambiguate.
> >
> >> + "invalid burn-out-current-nanoamp value\n");
While this is true, there might be the case when it won't help. When the kernel
is compiled without printk() support and run in production the userspace still
may decode an error from the number representation. That's why in a tricky cases
(this one probably not that tricky, but just saying) it's very important to use
better granularity for the error codes.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-09-01 6:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 22:27 [PATCH v2 0/2] iio: adc: ti-ads112c14: add burnout current support David Lechner (TI)
2026-08-27 22:27 ` [PATCH v2 1/2] " David Lechner (TI)
2026-08-28 7:38 ` Andy Shevchenko
2026-08-31 21:14 ` David Lechner
2026-09-01 6:51 ` Andy Shevchenko [this message]
2026-08-30 22:47 ` Jonathan Cameron
2026-08-27 22:27 ` [PATCH v2 2/2] iio: ABI: add sysfs attribute for _burnoutraw David Lechner (TI)
2026-08-28 7:39 ` Andy Shevchenko
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=apZ1-9WHcIynqmXS@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=c-hall@ti.com \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=kuurtb@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=pedwards@ti.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