summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@openbios.org>2004-05-28 15:10:04 +0000
committerStefan Reinauer <stepan@openbios.org>2004-05-28 15:10:04 +0000
commitbb20a721630a2c37110d6b34def7748c883b4a70 (patch)
tree0a5369bcec9af0b0aaf9469e1ec7ab9f804ecf99 /src/lib
parent34e3a146a95bd917b99e2185a17690f467dab8fb (diff)
downloadcoreboot-bb20a721630a2c37110d6b34def7748c883b4a70.tar.xz
This will never happen unless the code is buggy (in which case it's easy to
reenable debugging output). git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1586 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/clog2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/clog2.c b/src/lib/clog2.c
index 092b49c821..41e2af9791 100644
--- a/src/lib/clog2.c
+++ b/src/lib/clog2.c
@@ -1,4 +1,8 @@
+#undef DEBUG_LOG2
+
+#ifdef DEBUG_LOG2
#include <console/console.h>
+#endif
unsigned long log2(unsigned long x)
{
@@ -7,8 +11,10 @@ unsigned long log2(unsigned long x)
unsigned long pow = sizeof(x) * 8 - 1;
if (! x) {
+#ifdef DEBUG_LOG2
printk_warning("%s called with invalid parameter of 0\n",
__FUNCTION__);
+#endif
return -1;
}
for(; i > x; i >>= 1, pow--)