Re: do_div vs sector_t

Christoph Hellwig (hch@infradead.org)
Sat, 12 Jul 2003 07:52:02 +0100


On Fri, Jul 11, 2003 at 11:33:59PM +0100, Matthew Wilcox wrote:
> aic->seek_mean = aic->seek_total + 128;
> do_div(aic->seek_mean, aic->seek_samples);
> }
>
> seek_mean is a sector_t so sometimes it's 64-bit on a 32-bit platform.
> so we can't avoid calling do_div().

That's why we have sector_div, never use do_div on a sector_t.

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