From 5f4d5a9b38269af7633b097d82019a2fad48f1e9 Mon Sep 17 00:00:00 2001 From: Evan Green Date: Wed, 28 Jul 2021 10:00:37 -0700 Subject: test: Fix sbs_charging_v2's charge_control() cmd version charge_control() was sending EC_CMD_CHARGE_CONTROL version 2, but leaving params.cmd uninitialized. Apparently we were just getting lucky. I did not get as lucky when compiling in 32-bit mode. This test is clearly sending the version 1 form of the command, so make the version number match the intent so the EC doesn't fail the command. BUG=b:179062230 BRANCH=none TEST=make -j runhosttests BOARD=host on x86_64 and i686 Signed-off-by: Evan Green Change-Id: Ie440ff825e1125bb50b4ac2477ba983e00ef303e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3059229 Reviewed-by: Diana Z Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3105741 Tested-by: Daisuke Nojiri Reviewed-by: Jack Rosenthal Commit-Queue: Daisuke Nojiri --- test/sbs_charging_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sbs_charging_v2.c b/test/sbs_charging_v2.c index 309624dd20..f8a425c5cd 100644 --- a/test/sbs_charging_v2.c +++ b/test/sbs_charging_v2.c @@ -112,7 +112,7 @@ static int charge_control(enum ec_charge_control_mode mode) { struct ec_params_charge_control params; params.mode = mode; - return test_send_host_command(EC_CMD_CHARGE_CONTROL, 2, ¶ms, + return test_send_host_command(EC_CMD_CHARGE_CONTROL, 1, ¶ms, sizeof(params), NULL, 0); } -- cgit v1.2.1