Re: [RESEND PATCH 09/11] platform/chrome: cros_ec_proto: return standard error codes for EC errors

From: Tzung-Bi Shih
Date: Wed Jul 13 2022 - 23:42:01 EST


On Wed, Jul 13, 2022 at 11:23:58AM -0700, Guenter Roeck wrote:
> On Mon, Jun 27, 2022 at 7:49 PM Tzung-Bi Shih <tzungbi@xxxxxxxxxx> wrote:
> >
> > cros_ec_wait_until_complete() checks `msg->result` for
> > EC_CMD_GET_COMMS_STATUS. However, it doesn't return standard error codes
> > like most of others.
>
> The callers of cros_ec_send_command() do the mapping. I am not sure if
> it is a good idea to change that; it may have undesired side effects
> (such as changing the userspace ABI) for callers of
> cros_ec_send_command() not expecting this change. It would also result
> in double mapping in some situations.

Agreed. Let's drop the change.