Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/50243 )
Change subject: amd/common/block/acpi/pm_state: fix comparison in get_index_bit ......................................................................
amd/common/block/acpi/pm_state: fix comparison in get_index_bit
In the case of passing 32 as limit the code returned -1, but should have continued, since 32 is a valid value here.
Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: I6ca341841bad62abcb4ea26a350c539813a29de7 Reviewed-on: https://review.coreboot.org/c/coreboot/+/50243 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Raul Rangel rrangel@chromium.org --- M src/soc/amd/common/block/acpi/pm_state.c 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Raul Rangel: Looks good to me, approved
diff --git a/src/soc/amd/common/block/acpi/pm_state.c b/src/soc/amd/common/block/acpi/pm_state.c index a009718..05bb927 100644 --- a/src/soc/amd/common/block/acpi/pm_state.c +++ b/src/soc/amd/common/block/acpi/pm_state.c @@ -13,7 +13,7 @@ uint16_t i; uint32_t t;
- if (limit >= TOTAL_BITS(uint32_t)) + if (limit > TOTAL_BITS(uint32_t)) return -1;
/* get a mask of valid bits. Ex limit = 3, set bits 0-2 */