From: Tim Gardner Date: Mon, 15 Jul 2013 14:56:45 +0000 (-0600) Subject: mlx5 core: Fix __udivdi3 when compiling for 32 bit arches X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9a0f06fee1f453370e87b6568dc1d39d676f53fc;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mlx5 core: Fix __udivdi3 when compiling for 32 bit arches Cc: Eli Cohen Signed-off-by: Tim Gardner Acked-by: Randy Dunlap Reported-by: Randy Dunlap Signed-off-by: David S. Miller --- 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, stats = filp->private_data; spin_lock(&stats->lock); if (stats->n) - field = stats->sum / stats->n; + field = div64_u64(stats->sum, stats->n); spin_unlock(&stats->lock); ret = snprintf(tbuf, sizeof(tbuf), "%llu\n", field); if (ret > 0) {