aboutsummaryrefslogtreecommitdiff
path: root/payloads
diff options
context:
space:
mode:
authorSubrata Banik <subratabanik@google.com>2024-04-18 07:04:04 +0000
committerSubrata Banik <subratabanik@google.com>2024-04-19 08:29:12 +0000
commit70108382dec47762bcebf35d7698897bfed177b6 (patch)
tree83cbf18ccb97939536b3fc7f8db1a6449c058c9e /payloads
parent271ee0745e4bc104949b20f433216f1f0a06fb46 (diff)
libpayload: Fix inl() return type mismatch
Change `inl()` return type from `unsigned long` to `unsigned int` to match the function definition and ensure consistency across platforms. BUG=b:242829490 TEST=Compiled successfully in 32-bit and 64-bit modes. Change-Id: I681935665c8de9ee472ab72fe1ac2f5dcc0f2534 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81961 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Diffstat (limited to 'payloads')
-rw-r--r--payloads/libpayload/include/x86/arch/io.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/payloads/libpayload/include/x86/arch/io.h b/payloads/libpayload/include/x86/arch/io.h
index d15e15d543..352affd2bf 100644
--- a/payloads/libpayload/include/x86/arch/io.h
+++ b/payloads/libpayload/include/x86/arch/io.h
@@ -90,7 +90,7 @@ static inline __attribute__((always_inline)) void write64(volatile void *addr, u
static inline unsigned int inl(int port)
{
- unsigned long val;
+ unsigned int val;
__asm__ __volatile__("inl %w1, %0" : "=a"(val) : "Nd"(port));
return val;
}