mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 18:13:04 +00:00
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>
This commit is contained in:
parent
31bd29776b
commit
9a0f06fee1
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user