From: Ben Hutchings <bhutchings@solarflare.com>
To: "David H. Lynch Jr." <dhlii@dlasys.net>
Cc: netdev@vger.kernel.org, linuxppc-embedded <linuxppc-embedded@ozlabs.org>
Subject: Re: [PATCH] Linux Device Driver for Xilinx LL TEMAC 10/100/1000 Ethernet NIC
Date: Mon, 18 Aug 2008 15:36:51 +0100 [thread overview]
Message-ID: <20080818143649.GD7908@solarflare.com> (raw)
In-Reply-To: <20080818123056.GA7908@solarflare.com>
I wrote:
> > +static struct net_device_stats *
> > +temac_get_stats(struct net_device *ndev)
> > +{
> > + return netdev_priv(ndev);
>
> Not even the right type. Do you read your compiler warnings?
Sorry, I now see that this is correct, though it's very fragile - it will
silently break if struct temac_local is reordered.
struct net_device includes a stats buffer which you should be able to use
instead of adding your own in struct temac_local.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
WARNING: multiple messages have this Message-ID (diff)
From: Ben Hutchings <bhutchings@solarflare.com>
To: "David H. Lynch Jr." <dhlii@dlasys.net>
Cc: linuxppc-embedded <linuxppc-embedded@ozlabs.org>, netdev@vger.kernel.org
Subject: Re: [PATCH] Linux Device Driver for Xilinx LL TEMAC 10/100/1000 Ethernet NIC
Date: Mon, 18 Aug 2008 15:36:51 +0100 [thread overview]
Message-ID: <20080818143649.GD7908@solarflare.com> (raw)
In-Reply-To: <20080818123056.GA7908@solarflare.com>
I wrote:
> > +static struct net_device_stats *
> > +temac_get_stats(struct net_device *ndev)
> > +{
> > + return netdev_priv(ndev);
>
> Not even the right type. Do you read your compiler warnings?
Sorry, I now see that this is correct, though it's very fragile - it will
silently break if struct temac_local is reordered.
struct net_device includes a stats buffer which you should be able to use
instead of adding your own in struct temac_local.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2008-08-18 14:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-17 4:59 [PATCH] Linux Device Driver for Xilinx LL TEMAC 10/100/1000 Ethernet NIC David H. Lynch Jr.
2008-08-18 12:30 ` Ben Hutchings
2008-08-18 12:30 ` Ben Hutchings
2008-08-18 14:36 ` Ben Hutchings [this message]
2008-08-18 14:36 ` Ben Hutchings
2008-08-18 17:01 ` [PATCH] Linux Device Driver for Xilinx LL TEMAC 10/100/1000 EthernetNIC Stephen Neuendorffer
2008-08-18 17:01 ` Stephen Neuendorffer
-- strict thread matches above, loose matches on Subject: below --
2008-08-19 9:34 [PATCH] Linux Device Driver for Xilinx LL TEMAC 10/100/1000 Ethernet NIC David H. Lynch Jr.
2008-08-22 16:10 ` Sergey Temerkhanov
2008-08-22 16:14 ` Sergey Temerkhanov
2008-09-14 0:13 ` Jeff Garzik
2008-09-14 0:13 ` Jeff Garzik
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=20080818143649.GD7908@solarflare.com \
--to=bhutchings@solarflare.com \
--cc=dhlii@dlasys.net \
--cc=linuxppc-embedded@ozlabs.org \
--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.