summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTim Gardner <tim.gardner@canonical.com>2013-07-15 08:56:45 -0600
committerDavid S. Miller <davem@davemloft.net>2013-07-16 12:36:39 -0700
commit9a0f06fee1f453370e87b6568dc1d39d676f53fc (patch)
tree50d113154d26a3cdd8dd8c74242d783d3455a5f2 /drivers
parent31bd29776b8575b8cf7c25bbf7496a460278dc83 (diff)
downloadlinux-9a0f06fee1f453370e87b6568dc1d39d676f53fc.tar.bz2
mlx5 core: Fix __udivdi3 when compiling for 32 bit arches
Cc: Eli Cohen <eli@mellanox.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/debugfs.c2
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,
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) {