From: Brian Norris <briannorris@chromium.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com>,
Benson Leung <bleung@chromium.org>,
Jonathan Cameron <jic23@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
Yu-Hsuan Hsu <yuhsuan@chromium.org>,
Prashant Malani <pmalani@chromium.org>
Subject: Re: [PATCH v2 0/4] platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes
Date: Wed, 22 Jul 2020 15:03:01 -0700 [thread overview]
Message-ID: <20200722220301.GB2137556@google.com> (raw)
In-Reply-To: <20200720202243.180230-1-linux@roeck-us.net>
Hi Guenter,
On Mon, Jul 20, 2020 at 01:22:39PM -0700, Guenter Roeck wrote:
> The EC reports a variety of error codes. Most of those, with the exception
> of EC_RES_INVALID_VERSION, are converted to -EPROTO. As result, the actual
> error code gets lost. In cros_ec_cmd_xfer_status(), convert all EC errors
> to Linux error codes to report a more meaningful error to the caller to aid
> debugging.
>
> To prepare for this change, handle error codes other than -EPROTO for all
> callers of cros_ec_cmd_xfer_status(). Specifically, no longer assume that
> -EPROTO reflects an error from the EC and all other error codes reflect a
> transfer error.
>
> v2: Add patches 1/4 to 3/4 to handle callers of cros_ec_cmd_xfer_status()
I did a rough grep to see what you might be missing:
git grep -n EPROTO | grep -e cros -e '-ec'
I think cros-ec-pwm / cros_ec_num_pwms() might need fixing too? Boy, I
wrote that, but it sure ain't easy to read...(*checks watch*)...4 years
later.
Apart from the notes already made, I think the series looks good:
Reviewed-by: Brian Norris <briannorris@chromium.org>
Feel free to CC me on v3, if you want another look
Brian
next prev parent reply other threads:[~2020-07-22 22:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-20 20:22 [PATCH v2 0/4] platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes Guenter Roeck
2020-07-20 20:22 ` [PATCH v2 1/4] iio: cros_ec: Accept -EOPNOTSUPP as 'not supported' error code Guenter Roeck
2020-07-26 12:26 ` Jonathan Cameron
2020-07-20 20:22 ` [PATCH v2 2/4] cros_ec_lightbar: Accept more error codes from cros_ec_cmd_xfer_status Guenter Roeck
2020-07-20 20:22 ` [PATCH v2 3/4] platform/chrome: cros_ec_sysfs: Report range of error codes from EC Guenter Roeck
2020-07-20 20:22 ` [PATCH v2 4/4] platform/chrome: cros_ec_proto: Convert EC error codes to Linux error codes Guenter Roeck
2020-07-21 11:29 ` Enric Balletbo i Serra
2020-07-21 14:11 ` Guenter Roeck
2020-07-21 14:23 ` Guenter Roeck
2020-07-22 21:52 ` Brian Norris
2020-07-22 22:01 ` Guenter Roeck
2020-07-22 22:03 ` Brian Norris [this message]
2020-07-22 22:31 ` [PATCH v2 0/4] " Guenter Roeck
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=20200722220301.GB2137556@google.com \
--to=briannorris@chromium.org \
--cc=bleung@chromium.org \
--cc=enric.balletbo@collabora.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=pmalani@chromium.org \
--cc=yuhsuan@chromium.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;
as well as URLs for NNTP newsgroup(s).