Re: [PATCH] Kill div64.h dupes, parenthesize do_div() macro params

From: Andrew Morton (akpm@digeo.com)
Date: Tue Jul 01 2003 - 21:32:50 EST


Bernardo Innocenti <bernie@develer.com> wrote:
>
> By the way, what do you think about getting rid of the do_div() macro
> altogether?

I think we leave it the way it is because 64-bit divides are slow.

It is very easy to go accidentally adding 64-bit divides. Say, by changing
the disk indexing to use 64-bit sector numbers as we did earlier in 2.5.

By requiring an explicit do_div we are made aware of all those 64-bit
divides and are made to think about them.

Why 64-bit divides in particular were victimised in this manner is a matter
for speculation ;)

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



This archive was generated by hypermail 2b29 : Mon Jul 07 2003 - 22:00:14 EST