From: Andrew Lunn <andrew@lunn.ch>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com
Subject: Re: [PATCH net] net: bcmsysport: Device stats are unsigned long
Date: Thu, 30 Jun 2016 20:33:36 +0200 [thread overview]
Message-ID: <20160630183336.GM7480@lunn.ch> (raw)
In-Reply-To: <1467309389-12377-1-git-send-email-f.fainelli@gmail.com>
On Thu, Jun 30, 2016 at 10:56:29AM -0700, Florian Fainelli wrote:
> On 64bits kernels, device stats are 64bits wide, not 32bits.
>
> Fixes: 80105befdb4b ("net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> drivers/net/ethernet/broadcom/bcmsysport.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
> index 543bf38105c9..21f21e23e695 100644
> --- a/drivers/net/ethernet/broadcom/bcmsysport.c
> +++ b/drivers/net/ethernet/broadcom/bcmsysport.c
> @@ -392,7 +392,11 @@ static void bcm_sysport_get_stats(struct net_device *dev,
> else
> p = (char *)priv;
> p += s->stat_offset;
> - data[i] = *(u32 *)p;
Hi Florian
Could you not just change this cast from u32 to unsigned long and be
done?
160 struct net_device_stats {
161 unsigned long rx_packets;
162 unsigned long tx_packets;
Andrew
next prev parent reply other threads:[~2016-06-30 18:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-30 17:56 [PATCH net] net: bcmsysport: Device stats are unsigned long Florian Fainelli
2016-06-30 18:33 ` Andrew Lunn [this message]
2016-06-30 19:58 ` Florian Fainelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160630183336.GM7480@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.