From: Florian Fainelli <f.fainelli@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
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 12:58:47 -0700 [thread overview]
Message-ID: <577579F7.4040203@gmail.com> (raw)
In-Reply-To: <20160630183336.GM7480@lunn.ch>
On 06/30/2016 11:33 AM, Andrew Lunn wrote:
> 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?
Seems like this would work yes, even with our mixture of u32 stats read
from HW and the software netdev stats, thanks!
--
Florian
prev parent reply other threads:[~2016-06-30 19:58 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
2016-06-30 19:58 ` Florian Fainelli [this message]
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=577579F7.4040203@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.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 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).