Re: [-mm patch] add timespec_to_us() and use it in kernel/tsacct.c

From: Paul Mackerras
Date: Mon Aug 07 2006 - 20:00:20 EST


Andrew Morton writes:
> On Mon, 7 Aug 2006 15:32:41 +0200
> Adrian Bunk <bunk@xxxxxxxxx> wrote:
> > This doesn't look correct since do_div() does not guarantee to return
> > more than 32bit.
>
> eh? We use do_div() to do 64bit/something all the time??

Indeed. If do_div didn't return a 64-bit quotient then
printk("%lld", ...) wouldn't work. (The remainder is 32-bit of course,
because the divisor is 32-bit.)

Paul.

-
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/