Felix Held has uploaded this change for review. ( 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 --- M src/soc/amd/common/block/acpi/pm_state.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/43/50243/1
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 */