scst: Avoid using 64-bit divisions on 32-bit systems

See also https://sourceforge.net/p/scst/tickets/17/.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7909 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2019-02-08 03:42:15 +00:00
parent 2d1a46182c
commit 685c3dfee3

View File

@@ -15841,7 +15841,7 @@ static void __scst_update_latency_stats(struct scst_cmd *cmd,
cmd->state, delta);
delta = 0;
}
delta /= 100;
do_div(delta, 100);
#ifdef SCST_MEASURE_CLOCK_CYCLES
deltac = nowc - stat->last_update_tsc;
if (deltac < 0 || deltac > tsc_khz * 1000) {
@@ -15849,7 +15849,7 @@ static void __scst_update_latency_stats(struct scst_cmd *cmd,
cmd->state, deltac);
deltac = 0;
}
deltac /= 100;
do_div(deltac, 100);
#endif
if (stat->count++ > 0) {
if (delta < stat->min)