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

Andrew Morton (akpm@digeo.com)
Tue, 1 Jul 2003 19:32:50 -0700


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/