summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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--)