Skip to contentSkip to conversation

platform/chrome: cros_ec_lightbar: Fix response size initialization

PATCH In review Tzung-Bi Shih 1 participant 2 messages Jan 30 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Tzung-Bi Shih

author maintainer
#0 lore raw

PATCH 1/1 platform/chrome: cros_ec_lightbar: Fix response size initialization

Commit 1e7913ff5f9f ("platform/chrome: cros_ec_lightbar: Reduce ligthbar get version command") meant to set smaller values for both request and response sizes.

However, it incorrectly assigned the response size to the result field instead of insize. Fix it.

Fixes 1e7913ff5f9f ("platform/chrome: cros_ec_lightbar: Reduce ligthbar get version command")

---
As the cut-off date for the next merge window is approaching. I really hope to include the fix in the cycle. Sent the fix by myself. See also
https://lore.kernel.org/chrome-platform/[email protected]/.

 drivers/platform/chrome/cros_ec_lightbar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/chrome/cros_ec_lightbar.c +1 -1
index 8352e9732791..3702baff5d4f 100644
@@ -126,7 +126,7 @@ static int get_lightbar_version(struct cros_ec_dev *ec,
 	param = (struct ec_params_lightbar *)msg->data;
 	param->cmd = LIGHTBAR_CMD_VERSION;
 	msg->outsize = sizeof(param->cmd);
-	msg->result = sizeof(resp->version);
+	msg->insize = sizeof(resp->version);
 	ret = cros_ec_cmd_xfer_status(ec->ec_dev, msg);
 	if (ret < 0 && ret != -EINVAL) {
 		ret = 0;
Signature · 1 line
2.53.0.rc2.204.g2597b5adb4-goog

A message that is not in the archive (sent off-list or not yet received): CAMHSBOWTc-gmT3f=Lrk=AnhxFe=MTkts5WTFLjQC14GZF0BXLQ@mail.gmail.com

author maintainer
#2 lore raw
Quoted 16 lines · Gwendal Grignou
Quoted 7 lines · Tzung-Bi Shih

Commit 1e7913ff5f9f ("platform/chrome: cros_ec_lightbar: Reduce ligthbar get version command") meant to set smaller values for both request and response sizes.

However, it incorrectly assigned the response size to the result field instead of insize. Fix it.

Quoted 7 lines

Closes:
https://lore.kernel.org/chrome-platform/CAMHSBOVrrYaB=1nEqZk09VkczCrj=6B-P8Fe29TpPdSDgT2CCQ@mail.gmail.com

Fixes 1e7913ff5f9f ("platform/chrome: cros_ec_lightbar: Reduce ligthbar

get version command")

Quoted 2 lines

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git for-next

[1/1] platform/chrome: cros_ec_lightbar: Fix response size initialization

      commit: ec0dd36dbf8b0b209e63d0cd795451fa2203c736

Thanks!