[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181113075714.GF29388@dell>
Date: Tue, 13 Nov 2018 07:57:14 +0000
From: Lee Jones <lee.jones@...aro.org>
To: Brian Norris <briannorris@...omium.org>
Cc: Benson Leung <bleung@...omium.org>, linux-kernel@...r.kernel.org,
Olof Johansson <olof@...om.net>,
Shawn Nematbakhsh <shawnn@...omium.org>,
Alexandru Stan <amstan@...omium.org>,
Gwendal Grignou <gwendal@...omium.org>,
Enrico Granata <egranata@...omium.org>,
RaviChandra Sadineni <ravisadineni@...omium.org>
Subject: Re: [PATCH v2 1/2] platform/chrome: straighten out
cros_ec_get_{next,host}_event() error codes
On Wed, 07 Nov 2018, Brian Norris wrote:
> cros_ec_get_next_event() is documented to return 0 for success and
> negative for errors. It currently returns negative for some errors, and
> non-negative (number of bytes received) for success (including some "no
> data available" responses as zero). This mostly works out OK, because the
> callers were more or less ignoring the documentation, and only treating
> positive values as success (and indepdently checking the modification of
> 'wakeup').
>
> Let's button this up by avoiding pretending to handle event/wakeup
> distinctions when no event info was retrieved (i.e., returned 0 bytes).
> And fix the documentation of cros_ec_get_host_event() and
> cros_ec_get_next_event() to accurately describe their behavior.
>
> Signed-off-by: Brian Norris <briannorris@...omium.org>
> ---
> v1 -> v2:
> * don't make as many changes to the API -- just fix the documentation
> and a few corner cases instead
> ---
> drivers/platform/chrome/cros_ec_proto.c | 4 ++--
> include/linux/mfd/cros_ec.h | 6 ++++--
> 2 files changed, 6 insertions(+), 4 deletions(-)
Acked-by: Lee Jones <lee.jones@...aro.org>
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Powered by blists - more mailing lists