From db6c3f25f0d4b7fc0fd7aefb0b2442584a7f2c99 Mon Sep 17 00:00:00 2001 From: Elyes HAOUAS Date: Wed, 26 Jun 2019 21:05:17 +0200 Subject: include/cpu/x86/mtrr: Fix return type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fms() and fls() returns an 'unsigned int'. Change-Id: Ia328e1e5a79c2e7606961bb1b68c01db6b77da21 Signed-off-by: Elyes HAOUAS Reviewed-on: https://review.coreboot.org/c/coreboot/+/33817 Reviewed-by: Nico Huber Reviewed-by: Kyösti Mälkki Tested-by: build bot (Jenkins) --- src/include/cpu/x86/mtrr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/include/cpu/x86/mtrr.h b/src/include/cpu/x86/mtrr.h index 49ed462952..29256c8d46 100644 --- a/src/include/cpu/x86/mtrr.h +++ b/src/include/cpu/x86/mtrr.h @@ -120,7 +120,7 @@ asmlinkage void soc_enable_mtrrs(void); /* fms: find most significant bit set, stolen from Linux Kernel Source. */ static inline unsigned int fms(unsigned int x) { - int r; + unsigned int r; __asm__("bsrl %1,%0\n\t" "jnz 1f\n\t" @@ -132,7 +132,7 @@ static inline unsigned int fms(unsigned int x) /* fls: find least significant bit set */ static inline unsigned int fls(unsigned int x) { - int r; + unsigned int r; __asm__("bsfl %1,%0\n\t" "jnz 1f\n\t" -- cgit v1.2.3