Re: MSEC_TO_JIFFIES is messed up...

From: Jeff Garzik
Date: Wed May 12 2004 - 13:44:33 EST


Greg KH wrote:
On Wed, May 12, 2004 at 02:07:00AM -0700, Andrew Morton wrote:

drivers/usb/host/ehci.h:599: warning: `MSEC_TO_JIFFIES' redefined
include/asm/param.h:9: warning: this is the location of the previous definition
In file included from drivers/usb/host/ohci-hcd.c:127:
drivers/usb/host/ohci.h:400: warning: `MSEC_TO_JIFFIES' redefined
include/asm/param.h:9: warning: this is the location of the previous definition


Woah, that's new. And wrong. The code in include/asm-i386/param.h that
says:
# define JIFFIES_TO_MSEC(x) (x)
# define MSEC_TO_JIFFIES(x) (x)

Is not correct. Look at kernel/sched.c for verification of this :)


Yes, that is _massively_ broken.

Tangent:
One of the SCTP folks was cleaning up all the random jif-to-msec and msec-to-jif macros into include/linux/time.h. Need to dig that up and merge it.

Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/