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
This commit is contained in:
parent
34e3a146a9
commit
bb20a72163
|
@ -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--)
|
||||
|
|
Loading…
Reference in New Issue