netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3.11-rc1] mlx5 core: Fix __udivdi3 when compiling for 32 bit arches
@ 2013-07-15 14:56 Tim Gardner
       [not found] ` <1373900205-69711-1-git-send-email-tim.gardner-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Gardner @ 2013-07-15 14:56 UTC (permalink / raw)
  To: netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Tim Gardner, Eli Cohen

Cc: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Tim Gardner <tim.gardner-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
---
 drivers/net/ethernet/mellanox/mlx5/core/debugfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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) {
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 3.11-rc1] mlx5 core: Fix __udivdi3 when compiling for 32 bit arches
       [not found] ` <1373900205-69711-1-git-send-email-tim.gardner-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
@ 2013-07-15 15:52   ` Randy Dunlap
       [not found]     ` <51E41AB2.3020905-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2013-07-15 15:52 UTC (permalink / raw)
  To: Tim Gardner
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Eli Cohen

On 07/15/13 07:56, Tim Gardner wrote:
> Cc: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Tim Gardner <tim.gardner-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>

I reported this last week and Eli wrote:

"I have this fixed in my tree and we run the driver on i386. I will check on Sunday why it is not in the patches submitted."

Anyway, the patch works for me.

Acked-by: Randy Dunlap <rdunlap-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Reported-by: Randy Dunlap <rdunlap-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>

Thanks.

> ---
>  drivers/net/ethernet/mellanox/mlx5/core/debugfs.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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) {
> 


-- 
~Randy
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 3.11-rc1] mlx5 core: Fix __udivdi3 when compiling for 32 bit arches
       [not found]     ` <51E41AB2.3020905-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
@ 2013-07-15 20:23       ` Tim Gardner
  2013-07-16 19:36       ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: Tim Gardner @ 2013-07-15 20:23 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Eli Cohen

On 07/15/2013 09:52 AM, Randy Dunlap wrote:
> On 07/15/13 07:56, Tim Gardner wrote:
>> Cc: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> Signed-off-by: Tim Gardner
>> <tim.gardner-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
> 
> I reported this last week and Eli wrote:
> 
> "I have this fixed in my tree and we run the driver on i386. I will
> check on Sunday why it is not in the patches submitted."
> 
> Anyway, the patch works for me.
> 
> Acked-by: Randy Dunlap <rdunlap-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> Reported-by: Randy
> Dunlap <rdunlap-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
> 

I figured someone must have seen it, but a cursory Google search on
"mlx5 __udivdi3" failed to turn up anything.

rtg
-- 
Tim Gardner tim.gardner-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 3.11-rc1] mlx5 core: Fix __udivdi3 when compiling for 32 bit arches
       [not found]     ` <51E41AB2.3020905-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
  2013-07-15 20:23       ` Tim Gardner
@ 2013-07-16 19:36       ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2013-07-16 19:36 UTC (permalink / raw)
  To: rdunlap-wEGCiKHe2LqWVfeAwA7xHQ
  Cc: tim.gardner-Z7WLFzj8eWMS+FvcfC7Uqw,
	netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, eli-VPRAkNaXOzVWk0Htik3J/w

From: Randy Dunlap <rdunlap-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Date: Mon, 15 Jul 2013 08:52:18 -0700

> On 07/15/13 07:56, Tim Gardner wrote:
>> Cc: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>> Signed-off-by: Tim Gardner <tim.gardner-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
> 
> I reported this last week and Eli wrote:
> 
> "I have this fixed in my tree and we run the driver on i386. I will check on Sunday why it is not in the patches submitted."
> 
> Anyway, the patch works for me.
> 
> Acked-by: Randy Dunlap <rdunlap-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
> Reported-by: Randy Dunlap <rdunlap-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-07-16 19:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-15 14:56 [PATCH 3.11-rc1] mlx5 core: Fix __udivdi3 when compiling for 32 bit arches Tim Gardner
     [not found] ` <1373900205-69711-1-git-send-email-tim.gardner-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2013-07-15 15:52   ` Randy Dunlap
     [not found]     ` <51E41AB2.3020905-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2013-07-15 20:23       ` Tim Gardner
2013-07-16 19:36       ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).