Re: [PATCH] staging: ozwpan: Fix build warning.

From: Rupesh Gujare
Date: Mon Aug 05 2013 - 06:04:11 EST


On 04/08/13 19:17, Anca Emanuel wrote:
Why do not use div_u64() ?

[quote]unsigned 64bit divide with 32bit divisor

This is the most common 64bit divide and should be used if possible,
as many 32bit archs can optimize this variant better than a full 64bit
divide.
[/quote]

- ep->credit += timespec_to_ns(&delta) / NSEC_PER_MSEC;
+ ep->credit += div64_u64(timespec_to_ns(&delta), NSEC_PER_MSEC);

Thank you Anca.

I will resend the patch.

--
Regards,
Rupesh Gujare

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