public inbox for chrome-platform@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] platform/chrome: cros_ec_lightbar: Fix response size initialization
@ 2026-01-30  4:03 Tzung-Bi Shih
       [not found] ` <CAMHSBOWTc-gmT3f=Lrk=AnhxFe=MTkts5WTFLjQC14GZF0BXLQ@mail.gmail.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Tzung-Bi Shih @ 2026-01-30  4:03 UTC (permalink / raw)
  To: Benson Leung; +Cc: Gwendal Grignou, chrome-platform, tzungbi

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.

Reported-by: Gwendal Grignou <gwendal@google.com>
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")
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
---
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/aXmaQeTV0oTqi_KB@google.com/.

 drivers/platform/chrome/cros_ec_lightbar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/chrome/cros_ec_lightbar.c b/drivers/platform/chrome/cros_ec_lightbar.c
index 8352e9732791..3702baff5d4f 100644
--- a/drivers/platform/chrome/cros_ec_lightbar.c
+++ b/drivers/platform/chrome/cros_ec_lightbar.c
@@ -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;
-- 
2.53.0.rc2.204.g2597b5adb4-goog


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

end of thread, other threads:[~2026-01-30  8:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-30  4:03 [PATCH] platform/chrome: cros_ec_lightbar: Fix response size initialization Tzung-Bi Shih
     [not found] ` <CAMHSBOWTc-gmT3f=Lrk=AnhxFe=MTkts5WTFLjQC14GZF0BXLQ@mail.gmail.com>
2026-01-30  8:03   ` Tzung-Bi Shih

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