Jianeng Ceng has uploaded this change for review.

View Change

acpi: Modify the order of increment operations

Currently, an error in index transfer causes confusion in the
output/input status when write gpio descriptor. Change this to perform
an increment operation at the same time when assigning values ​​to
correctly write the gpio output status.

BUG=None
TEST= Can get the correct index.

Change-Id: I7a3eb89633aaebebc8bd98ac6126c578fda23839
Signed-off-by: Jianeng Ceng <cengjianeng@huaqin.corp-partner.google.com>
---
M src/acpi/device.c
1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/88/82088/1
diff --git a/src/acpi/device.c b/src/acpi/device.c
index 091a086..7313639 100644
--- a/src/acpi/device.c
+++ b/src/acpi/device.c
@@ -51,7 +51,7 @@
return ret;

acpi_device_write_gpio(gpio);
- ret = *curr_index++;
+ ret = (*curr_index)++;

return ret;
}

To view, visit change 82088. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I7a3eb89633aaebebc8bd98ac6126c578fda23839
Gerrit-Change-Number: 82088
Gerrit-PatchSet: 1
Gerrit-Owner: Jianeng Ceng <cengjianeng@huaqin.corp-partner.google.com>
Gerrit-MessageType: newchange