Re: [PATCH] aacraid 2.5

From: Christoph Hellwig (hch@infradead.org)
Date: Fri Dec 06 2002 - 19:30:11 EST


On Fri, Dec 06, 2002 at 07:45:42AM -0800, Mark Haverkamp wrote:
> +/**
> + * Convert capacity to cylinders
> + * accounting for the fact capacity could be a 64 bit value
> + *
> + */
> +static inline u32 cap_to_cyls(sector_t capacity, u32 divisor)
> +{
> +#ifdef CONFIG_LBD
> + do_div(capacity, divisor);
> +#else
> + capacity /= divisor;
> +#endif
> + return (u32) capacity;
> +}

Please use sector_div() instead. It exists for a reason.

-
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 : Sat Dec 07 2002 - 22:00:28 EST