summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iommu/intel/perf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iommu/intel/perf.c b/drivers/iommu/intel/perf.c
index faaa96dda437..73b7ec705552 100644
--- a/drivers/iommu/intel/perf.c
+++ b/drivers/iommu/intel/perf.c
@@ -141,14 +141,14 @@ int dmar_latency_snapshot(struct intel_iommu *iommu, char *str, size_t size)
if (val == UINT_MAX)
val = 0;
else
- val /= 1000;
+ val = div_u64(val, 1000);
break;
case COUNTS_MAX:
- val /= 1000;
+ val = div_u64(val, 1000);
break;
case COUNTS_SUM:
if (lstat[i].samples)
- val /= (lstat[i].samples * 1000);
+ val = div_u64(val, (lstat[i].samples * 1000));
else
val = 0;
break;