Nobody can remember what do_div() does. Take pity, and copy Bernardo's description into i386/div64.h. include/asm-i386/div64.h | 10 ++++++++++ 1 files changed, 10 insertions(+) diff -puN include/asm-i386/div64.h~do_div-comment include/asm-i386/div64.h --- 25/include/asm-i386/div64.h~do_div-comment 2003-08-03 19:20:58.000000000 -0700 +++ 25-akpm/include/asm-i386/div64.h 2003-08-03 19:21:11.000000000 -0700 @@ -1,6 +1,16 @@ #ifndef __I386_DIV64 #define __I386_DIV64 +/* + * The semantics of do_div() are: + * + * uint32_t do_div(uint64_t *n, uint32_t base) + * { + * uint32_t remainder = *n % base; + * *n = *n / base; + * return remainder; + * } + */ #define do_div(n,base) ({ \ unsigned long __upper, __low, __high, __mod; \ asm("":"=a" (__low), "=d" (__high):"A" (n)); \ _