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>
This commit is contained in:
Subrata Banik 2024-04-18 07:04:04 +00:00
parent 271ee0745e
commit 70108382de
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}