public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/23] platform/chrome: Kunit tests and refactor for cros_ec_query_all()
@ 2022-06-08 11:07 Tzung-Bi Shih
  2022-06-08 11:07 ` [PATCH v3 01/23] platform/chrome: cros_ec_commands: fix compile errors Tzung-Bi Shih
                   ` (22 more replies)
  0 siblings, 23 replies; 42+ messages in thread
From: Tzung-Bi Shih @ 2022-06-08 11:07 UTC (permalink / raw)
  To: bleung, groeck; +Cc: chrome-platform, tzungbi, linux-kernel

The series adds Kunit tests, refactors, and clean-ups for cros_ec_query_all().

Tzung-Bi Shih (23):
  platform/chrome: cros_ec_commands: fix compile errors
-> Fixes compile errors when including cros_ec_commands.h.

  platform/chrome: cros_ec_proto: add Kunit tests for
    cros_ec_query_all()
-> Adds Kunit tests for cros_ec_query_all().  They are baseline tests
   for the following refactor patches.  They are designed to pass current
   code.

  platform/chrome: use macros for passthru indexes
  platform/chrome: cros_ec_proto: assign buffer size from protocol info
-> Refactors.

  platform/chrome: cros_ec_proto: remove redundant NULL check
-> Clean up.

  platform/chrome: cros_ec_proto: use cros_ec_map_error()
-> Changes the internal return code.

  platform/chrome: cros_ec_proto: separate cros_ec_get_proto_info()
-> Move refactor.

  platform/chrome: cros_ec_proto: add Kunit tests for getting proto info
  platform/chrome: cros_ec_proto: handle empty payload in getting proto
    info
-> Test and handle if send_command() returns 0 in cros_ec_get_proto_info().

  platform/chrome: cros_ec_proto: separate
    cros_ec_get_proto_info_legacy()
-> Move refactor.

  platform/chrome: cros_ec_proto: add Kunit test for getting legacy info
  platform/chrome: cros_ec_proto: handle empty payload in getting info
    legacy
-> Test and handle if send_command() returns 0 in
   cros_ec_get_proto_info_legacy().

  platform/chrome: cros_ec: don't allocate `din` and `dout` in
    cros_ec_register()
-> Clean up.

  platform/chrome: don't use devm variants for `din` and `dout`
-> Replace devm variants to non-devm.

  platform/chrome: cros_ec_proto: don't show MKBP version if unsupported
-> Minor fix up.

  platform/chrome: cros_ec_proto: return 0 on getting cmd mask success
-> Conform to kernel convention: return 0 on success;
   otherwise, negative integers.

  platform/chrome: cros_ec_proto: add Kunit test for getting cmd mask
    error
  platform/chrome: cros_ec_proto: check `msg->result` in getting cmd
    mask
-> Test and handle if `msg->result` isn't EC_RES_SUCCESS in
   cros_ec_get_host_command_version_mask().

  platform/chrome: cros_ec_proto: add Kunit tests for getting cmd mask
  platform/chrome: cros_ec_proto: handle empty payload in getting cmd
    mask
-> Test and handle if send_command() returns 0 in
   cros_ec_get_host_command_version_mask().

  platform/chrome: cros_ec_proto: return 0 on getting wake mask success
-> Conform to kernel convention: return 0 on success;
   otherwise, negative integers.

  platform/chrome: cros_ec_proto: add Kunit test for getting wake mask
  platform/chrome: cros_ec_proto: handle empty payload in getting wake
    mask
-> Test and handle if send_command() returns 0 in
   cros_ec_get_host_event_wake_mask().

 drivers/platform/chrome/Kconfig               |    6 +
 drivers/platform/chrome/Makefile              |    1 +
 drivers/platform/chrome/cros_ec.c             |   17 +-
 drivers/platform/chrome/cros_ec_proto.c       |  320 ++--
 drivers/platform/chrome/cros_ec_proto_test.c  | 1402 +++++++++++++++++
 drivers/platform/chrome/cros_ec_trace.h       |    8 +-
 drivers/platform/chrome/cros_kunit_util.c     |   98 ++
 drivers/platform/chrome/cros_kunit_util.h     |   36 +
 .../linux/platform_data/cros_ec_commands.h    |    4 +-
 include/linux/platform_data/cros_ec_proto.h   |    3 +
 10 files changed, 1717 insertions(+), 178 deletions(-)
 create mode 100644 drivers/platform/chrome/cros_kunit_util.c
 create mode 100644 drivers/platform/chrome/cros_kunit_util.h

Changes from v2:
(https://patchwork.kernel.org/project/chrome-platform/cover/20220607145639.2362750-1-tzungbi@kernel.org/)
- Split patches into smaller pieces.

Changes from v1:
(https://patchwork.kernel.org/project/chrome-platform/cover/20220606141051.285823-1-tzungbi@kernel.org/)
- Fix review comments.
- Split and reorder patches.

base-commit: 4319cbd4ed99003e0c981728ab1626c25be7af4a
-- 
2.36.1.255.ge46751e96f-goog


^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2022-06-09  8:48 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-08 11:07 [PATCH v3 00/23] platform/chrome: Kunit tests and refactor for cros_ec_query_all() Tzung-Bi Shih
2022-06-08 11:07 ` [PATCH v3 01/23] platform/chrome: cros_ec_commands: fix compile errors Tzung-Bi Shih
2022-06-08 11:07 ` [PATCH v3 02/23] platform/chrome: cros_ec_proto: add Kunit tests for cros_ec_query_all() Tzung-Bi Shih
2022-06-08 16:12   ` Guenter Roeck
2022-06-08 11:07 ` [PATCH v3 03/23] platform/chrome: use macros for passthru indexes Tzung-Bi Shih
2022-06-08 11:07 ` [PATCH v3 04/23] platform/chrome: cros_ec_proto: assign buffer size from protocol info Tzung-Bi Shih
2022-06-08 11:07 ` [PATCH v3 05/23] platform/chrome: cros_ec_proto: remove redundant NULL check Tzung-Bi Shih
2022-06-08 11:07 ` [PATCH v3 06/23] platform/chrome: cros_ec_proto: use cros_ec_map_error() Tzung-Bi Shih
2022-06-08 11:07 ` [PATCH v3 07/23] platform/chrome: cros_ec_proto: separate cros_ec_get_proto_info() Tzung-Bi Shih
2022-06-08 11:07 ` [PATCH v3 08/23] platform/chrome: cros_ec_proto: add Kunit tests for getting proto info Tzung-Bi Shih
2022-06-08 16:13   ` Guenter Roeck
2022-06-08 11:07 ` [PATCH v3 09/23] platform/chrome: cros_ec_proto: handle empty payload in " Tzung-Bi Shih
2022-06-08 16:13   ` Guenter Roeck
2022-06-08 11:07 ` [PATCH v3 10/23] platform/chrome: cros_ec_proto: separate cros_ec_get_proto_info_legacy() Tzung-Bi Shih
2022-06-08 11:07 ` [PATCH v3 11/23] platform/chrome: cros_ec_proto: add Kunit test for getting legacy info Tzung-Bi Shih
2022-06-08 16:14   ` Guenter Roeck
2022-06-08 11:07 ` [PATCH v3 12/23] platform/chrome: cros_ec_proto: handle empty payload in getting info legacy Tzung-Bi Shih
2022-06-08 16:14   ` Guenter Roeck
2022-06-08 11:07 ` [PATCH v3 13/23] platform/chrome: cros_ec: don't allocate `din` and `dout` in cros_ec_register() Tzung-Bi Shih
2022-06-08 16:15   ` Guenter Roeck
2022-06-09  5:09     ` Tzung-Bi Shih
2022-06-08 11:07 ` [PATCH v3 14/23] platform/chrome: don't use devm variants for `din` and `dout` Tzung-Bi Shih
2022-06-08 16:17   ` Guenter Roeck
2022-06-08 11:07 ` [PATCH v3 15/23] platform/chrome: cros_ec_proto: don't show MKBP version if unsupported Tzung-Bi Shih
2022-06-08 11:07 ` [PATCH v3 16/23] platform/chrome: cros_ec_proto: return 0 on getting cmd mask success Tzung-Bi Shih
2022-06-08 16:20   ` Guenter Roeck
2022-06-09  8:44     ` Tzung-Bi Shih
2022-06-08 11:07 ` [PATCH v3 17/23] platform/chrome: cros_ec_proto: add Kunit test for getting cmd mask error Tzung-Bi Shih
2022-06-08 16:21   ` Guenter Roeck
2022-06-08 11:07 ` [PATCH v3 18/23] platform/chrome: cros_ec_proto: check `msg->result` in getting cmd mask Tzung-Bi Shih
2022-06-08 16:23   ` Guenter Roeck
2022-06-08 16:27     ` Guenter Roeck
2022-06-08 11:07 ` [PATCH v3 19/23] platform/chrome: cros_ec_proto: add Kunit tests for " Tzung-Bi Shih
2022-06-08 16:28   ` Guenter Roeck
2022-06-08 11:07 ` [PATCH v3 20/23] platform/chrome: cros_ec_proto: handle empty payload in " Tzung-Bi Shih
2022-06-08 16:24   ` Guenter Roeck
2022-06-08 11:07 ` [PATCH v3 21/23] platform/chrome: cros_ec_proto: return 0 on getting wake mask success Tzung-Bi Shih
2022-06-08 16:26   ` Guenter Roeck
2022-06-08 11:07 ` [PATCH v3 22/23] platform/chrome: cros_ec_proto: add Kunit test for getting wake mask Tzung-Bi Shih
2022-06-08 16:29   ` Guenter Roeck
2022-06-08 11:07 ` [PATCH v3 23/23] platform/chrome: cros_ec_proto: handle empty payload in " Tzung-Bi Shih
2022-06-08 16:30   ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox