From 70108382dec47762bcebf35d7698897bfed177b6 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Thu, 18 Apr 2024 07:04:04 +0000 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/81961 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans Reviewed-by: Dinesh Gehlot --- payloads/libpayload/include/x86/arch/io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'payloads/libpayload/include/x86') 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; } -- cgit v1.2.3