diff options
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/debugfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/debugfs.c b/drivers/net/ethernet/mellanox/mlx5/core/debugfs.c index 4273c06e2e96..9c7194b26ee2 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/debugfs.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/debugfs.c | |||
@@ -156,7 +156,7 @@ static ssize_t average_read(struct file *filp, char __user *buf, size_t count, | |||
156 | stats = filp->private_data; | 156 | stats = filp->private_data; |
157 | spin_lock(&stats->lock); | 157 | spin_lock(&stats->lock); |
158 | if (stats->n) | 158 | if (stats->n) |
159 | field = stats->sum / stats->n; | 159 | field = div64_u64(stats->sum, stats->n); |
160 | spin_unlock(&stats->lock); | 160 | spin_unlock(&stats->lock); |
161 | ret = snprintf(tbuf, sizeof(tbuf), "%llu\n", field); | 161 | ret = snprintf(tbuf, sizeof(tbuf), "%llu\n", field); |
162 | if (ret > 0) { | 162 | if (ret > 0) { |