diff options
author | Tzung-Bi Shih <tzungbi@kernel.org> | 2022-05-18 17:18:13 +0800 |
---|---|---|
committer | Tzung-Bi Shih <tzungbi@kernel.org> | 2022-06-06 03:11:37 +0000 |
commit | 97b11dd6350a1d5fb076df69ebbf504eb5c4fd57 (patch) | |
tree | 8b335f2f5a3f4331cc0212db79474c66f6c82004 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 23a34e3a9d00829f6bed67004a751d5b48f6084a (diff) |
platform/chrome: cros_ec_proto: update cros_ec_check_result() comment
At first glance, cros_ec_check_result() is quite like cros_ec_map_error().
They check for `ec_msg->result` and return corresponding errors. However,
as calling from `pkt_xfer` and `cmd_xfer`, cros_ec_check_result() should
not report furthermore errors. -EAGAIN is the only exception.
See [1][2][3] for some known userland programs' code. The return code
from ioctl only denotes the EC communication status. Userland programs
would further analyze the `result` in struct cros_ec_command* for
follow-up actions (e.g. [4]).
To clarify, update the function comment.
[1]: https://crrev.com/54400e93a75ef440a83d6eaac2cec066daf99cf0/util/comm-dev.c#154
[2]: https://crrev.com/fe32670a89bf59e1aff84bba9dd3295657b85e9b/cros_ec_dev.c#296
[3]: https://crrev.com/4e19eb1d89de0422ff1bbd3f7260b131c761098c/drivers/google/cros_ec_dev.c#120
[4]: https://crrev.com/54400e93a75ef440a83d6eaac2cec066daf99cf0/util/comm-dev.c#164
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Link: https://lore.kernel.org/r/20220518091814.2028579-4-tzungbi@kernel.org
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions