From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Lee Jones <lee.jones@linaro.org>
Cc: linux-kernel@vger.kernel.org, Andy Shevchenko <andy@kernel.org>
Subject: Re: [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store()
Date: Tue, 28 Jun 2022 13:38:32 +0300 [thread overview]
Message-ID: <YrraKMemrHImty7s@smile.fi.intel.com> (raw)
In-Reply-To: <YrrOHtDjI+P6Iq0r@google.com>
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
next prev parent reply other threads:[~2022-06-28 10:38 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-16 16:58 Andy Shevchenko
2022-06-16 16:58 ` [PATCH v1 02/11] mfd: intel_soc_pmic_bxtwc: Create sysfs attributes using core driver's facility Andy Shevchenko
2022-06-27 9:07 ` Lee Jones
2022-06-16 16:58 ` [PATCH v1 03/11] mfd: intel_soc_pmic_bxtwc: Convert to use platform_get/set_drvdata() Andy Shevchenko
2022-06-27 9:08 ` Lee Jones
2022-06-16 16:58 ` [PATCH v1 04/11] mfd: intel_soc_pmic_bxtwc: Use dev_err_probe() Andy Shevchenko
2022-06-27 9:22 ` Lee Jones
2022-06-16 16:58 ` [PATCH v1 05/11] mfd: intel_soc_pmic_bxtwc: Extend use of temporary variable for struct device Andy Shevchenko
2022-06-27 9:27 ` Lee Jones
2022-06-16 16:58 ` [PATCH v1 06/11] mfd: intel_soc_pmic_bxtwc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Andy Shevchenko
2022-06-27 9:27 ` Lee Jones
2022-06-16 16:58 ` [PATCH v1 07/11] mfd: intel_soc_pmic_bxtwc: Drop redundant ACPI_PTR() Andy Shevchenko
2022-06-27 9:28 ` Lee Jones
2022-06-16 16:58 ` [PATCH v1 08/11] mfd: intel_soc_pmic_bxtwc: Use bits.h macros for all masks Andy Shevchenko
2022-06-27 9:30 ` Lee Jones
2022-06-16 16:58 ` [PATCH v1 09/11] mfd: intel_soc_pmic_bxtwc: Use sysfs_emit() instead of sprintf() Andy Shevchenko
2022-06-27 9:30 ` Lee Jones
2022-06-16 16:58 ` [PATCH v1 10/11] mfd: intel_soc_pmic_bxtwc: Drop unneeded casting Andy Shevchenko
2022-06-27 9:31 ` Lee Jones
2022-06-16 16:58 ` [PATCH v1 11/11] mfd: intel_soc_pmic_bxtwc: Fix spelling in the comment Andy Shevchenko
2022-06-27 9:33 ` Lee Jones
2022-06-28 9:38 ` Andy Shevchenko
2022-06-28 9:56 ` Lee Jones
2022-06-28 10:36 ` Andy Shevchenko
2022-06-27 9:05 ` [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store() Lee Jones
2022-06-28 9:45 ` Andy Shevchenko
2022-06-28 9:47 ` Lee Jones
2022-06-28 10:38 ` Andy Shevchenko [this message]
2022-06-29 14:34 ` Lee Jones
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=YrraKMemrHImty7s@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=andy@kernel.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
/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
Powered by JetHome