diff options
author | David S. Miller <davem@davemloft.net> | 2019-07-25 11:34:39 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-07-25 11:34:39 -0700 |
commit | 16b2084a8afa1432d14ba72b7c97d7908e178178 (patch) | |
tree | a732473c0003c77063264a97d84a3b46b7f2dd78 /lib/dim/dim.c | |
parent | c8ec4632c6ac9cda0e8c3d51aa41eeab66585bd5 (diff) | |
parent | f8be17b81d44aed1f9ea68c3fc70f501c9616e2d (diff) |
Merge branch 'dim-fixes'
Leon Romanovsky says:
====================
DIM fixes for 5.3
Those two fixes for recently merged DIM patches, both exposed through
RDMa DIM usage.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/dim/dim.c')
-rw-r--r-- | lib/dim/dim.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/dim/dim.c b/lib/dim/dim.c index 439d641ec796..38045d6d0538 100644 --- a/lib/dim/dim.c +++ b/lib/dim/dim.c @@ -74,8 +74,8 @@ void dim_calc_stats(struct dim_sample *start, struct dim_sample *end, delta_us); curr_stats->cpms = DIV_ROUND_UP(ncomps * USEC_PER_MSEC, delta_us); if (curr_stats->epms != 0) - curr_stats->cpe_ratio = - (curr_stats->cpms * 100) / curr_stats->epms; + curr_stats->cpe_ratio = DIV_ROUND_DOWN_ULL( + curr_stats->cpms * 100, curr_stats->epms); else curr_stats->cpe_ratio = 0; |