]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
mlx5 core: Fix __udivdi3 when compiling for 32 bit arches
authorTim Gardner <tim.gardner@canonical.com>
Mon, 15 Jul 2013 14:56:45 +0000 (08:56 -0600)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Jul 2013 19:36:39 +0000 (12:36 -0700)
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>
drivers/net/ethernet/mellanox/mlx5/core/debugfs.c

index 4273c06e2e967be08db5bcc99862b723e667eca7..9c7194b26ee2dbf3aa3dd1b1f19b3de290d13f57 100644 (file)
@@ -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) {