From 9a0f06fee1f453370e87b6568dc1d39d676f53fc Mon Sep 17 00:00:00 2001 From: Tim Gardner Date: Mon, 15 Jul 2013 08:56:45 -0600 Subject: 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 4273c06..9c7194b 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) { -- cgit v0.10.2