From 2df5e3a40715c0692c99720fa3290fa383b7815e Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Fri, 9 Mar 2007 16:02:58 +0000 Subject: [PATCH] Use 'unsigned int' instead of 'unsigned'. Make udelay() use 'unsigned int' instead of 'int'. Fix interface of log2(), the current implementation takes an 'unsigned int' and returns an 'int'. Purely cosmetic fix in the license header (consistency reasons). Signed-off-by: Uwe Hermann Acked-by: Stefan Reinauer git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@231 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- arch/x86/udelay_io.c | 4 ++-- include/lib.h | 12 ++++++------ lib/delay.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/x86/udelay_io.c b/arch/x86/udelay_io.c index 898e471ef6..288c76bb38 100644 --- a/arch/x86/udelay_io.c +++ b/arch/x86/udelay_io.c @@ -20,9 +20,9 @@ #include -void udelay(int usecs) +void udelay(unsigned int usecs) { - int i; + unsigned int i; for (i = 0; i < usecs; i++) outb(i & 0xff, 0x80); } diff --git a/include/lib.h b/include/lib.h index e00db37a9b..1bce5f9eb7 100644 --- a/include/lib.h +++ b/include/lib.h @@ -5,8 +5,8 @@ * Written by Stefan Reinauer for coresystems GmbH. * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -21,10 +21,10 @@ #ifndef LIB_H #define LIB_H -unsigned long log2(unsigned long x); +int log2(unsigned int n); -void udelay(unsigned usecs); -void mdelay(unsigned msecs); -void delay(unsigned secs); +void udelay(unsigned int usecs); +void mdelay(unsigned int msecs); +void delay(unsigned int secs); #endif diff --git a/lib/delay.c b/lib/delay.c index 1a664b8cf1..8214556b2e 100644 --- a/lib/delay.c +++ b/lib/delay.c @@ -20,14 +20,14 @@ #include -void mdelay(unsigned msecs) +void mdelay(unsigned int msecs) { unsigned int i; for (i = 0; i < msecs; i++) { udelay(1000); } } -void delay(unsigned secs) +void delay(unsigned int secs) { unsigned int i; for (i = 0; i < secs; i++) {