------- Comment #8 from mt-ml at gmx dot de 2008-06-08 00:17 -------
I've been able to identify the code where ilog2 is called. If I do not choose
usbcore as a module I get the following error:
drivers/built-in.o: In function `usb_submit_urb':
(.text+0xc247f): undefined reference to `____ilog2_NaN'
make: *** [.tmp_vmlinux1] Fehler 1
Observing that function usb_submit_urb() in drivers/usb/core/urb.c shows the
interesting lines should be:
case USB_ENDPOINT_XFER_INT:
/* too small? */
if (urb->interval <= 0)
return -EINVAL;
/* too big? */
switch (dev->speed) {
case USB_SPEED_HIGH: /* units are microframes */
/* NOTE usb handles 2^15 */
if (urb->interval > (1024 * 8))
urb->interval = 1024 * 8;
max = 1024 * 8;
break;
case USB_SPEED_FULL: /* units are frames/msec */
case USB_SPEED_LOW:
if (xfertype == USB_ENDPOINT_XFER_INT) {
if (urb->interval > 255)
return -EINVAL;
/* NOTE ohci only handles up to 32 */
max = 128;
} else {
if (urb->interval > 1024)
urb->interval = 1024;
/* NOTE usb and ohci handle up to 2^15 */
max = 1024;
}
break;
default:
return -EINVAL;
}
/* Round down to a power of 2, no more than max */
urb->interval = min(max, 1 << ilog2(urb->interval));
}
As you can see, the argument to ilog2 is urb->interval which can't be zero at
that point IMHO.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36359