platform/chrome: cros_ec_lightbar: Fix response size initialization
Subsystems (2)
Tzung-Bi Shih
maintainerPATCH 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.
---
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
@@ -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
Tzung-Bi Shih
maintainerQuoted 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
resultfield instead ofinsize. Fix it.Quoted 7 lines
Reported-by Gwendal Grignou <[email protected]>Fixes 1e7913ff5f9f ("platform/chrome: cros_ec_lightbar: Reduce ligthbarget version command")
Signed-off-by Tzung-Bi Shih <[email protected]>
Quoted 2 lines
Reviewed-by Gwendal Grignou <[email protected]>[...]
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!