aboutsummaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2021-02-10 18:57:04 +0100
committerFelix Held <felix-coreboot@felixheld.de>2021-02-11 19:00:44 +0000
commit373769f1030fd4f5f350229c5bfd177945caae98 (patch)
tree4b1f03aea000650dc4e121c372cdbec298e8fa0a /src/soc
parent5dd52c77f7980e60d659133e6815f9e0a463759e (diff)
soc/amd/common/block/acpi/pm_state: don't rely on undefined behavior
Change-Id: I5a76a38f8d84666f6b9c0bfffecca064fa82d593 Found-by: Coverity CID 1445994 Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/50492 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/amd/common/block/acpi/pm_state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/soc/amd/common/block/acpi/pm_state.c b/src/soc/amd/common/block/acpi/pm_state.c
index ea22ec564a..643cb0267b 100644
--- a/src/soc/amd/common/block/acpi/pm_state.c
+++ b/src/soc/amd/common/block/acpi/pm_state.c
@@ -18,7 +18,7 @@ static int get_index_bit(uint32_t value, uint16_t limit)
return -1;
/* get a mask of valid bits. Ex limit = 3, set bits 0-2 */
- t = (1 << limit) - 1;
+ t = (1ULL << limit) - 1;
if ((value & t) == 0)
return -1;
t = 1;