Re: [PATCH v2 1/2] platform/chrome: straighten out cros_ec_get_{next,host}_event() error codes

2018-11-13 Thread Benson Leung
Hi Brian, On Wed, Nov 07, 2018 at 06:49:38PM -0800, 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

Re: [PATCH v2 1/2] platform/chrome: straighten out cros_ec_get_{next,host}_event() error codes

2018-11-13 Thread Benson Leung
Hi Brian, On Wed, Nov 07, 2018 at 06:49:38PM -0800, 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

Re: [PATCH v2 1/2] platform/chrome: straighten out cros_ec_get_{next,host}_event() error codes

2018-11-12 Thread Lee Jones
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).

Re: [PATCH v2 1/2] platform/chrome: straighten out cros_ec_get_{next,host}_event() error codes

2018-11-12 Thread Lee Jones
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).

[PATCH v2 1/2] platform/chrome: straighten out cros_ec_get_{next,host}_event() error codes

2018-11-07 Thread Brian Norris
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

[PATCH v2 1/2] platform/chrome: straighten out cros_ec_get_{next,host}_event() error codes

2018-11-07 Thread Brian Norris
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