Nico Huber merged this change.

View Change

Approvals: build bot (Jenkins): Verified Kyösti Mälkki: Looks good to me, but someone else must approve Nico Huber: Looks good to me, approved
include/cpu/x86/mtrr: Fix return type

fms() and fls() returns an 'unsigned int'.

Change-Id: Ia328e1e5a79c2e7606961bb1b68c01db6b77da21
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/33817
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
---
M src/include/cpu/x86/mtrr.h
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/include/cpu/x86/mtrr.h b/src/include/cpu/x86/mtrr.h
index 49ed462..29256c8 100644
--- a/src/include/cpu/x86/mtrr.h
+++ b/src/include/cpu/x86/mtrr.h
@@ -120,7 +120,7 @@
/* 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 @@
/* 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"

To view, visit change 33817. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia328e1e5a79c2e7606961bb1b68c01db6b77da21
Gerrit-Change-Number: 33817
Gerrit-PatchSet: 3
Gerrit-Owner: HAOUAS Elyes <ehaouas@noos.fr>
Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Reviewer: HAOUAS Elyes <ehaouas@noos.fr>
Gerrit-Reviewer: Jacob Garber <jgarber1@ualberta.ca>
Gerrit-Reviewer: Kyösti Mälkki <kyosti.malkki@gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-MessageType: merged