[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150617211020.69cae194@uryu.home.lan>
Date: Wed, 17 Jun 2015 21:10:20 -0400
From: Stephen Hemminger <stephen@...workplumber.org>
To: Taku Izumi <izumi.taku@...fujitsu.com>
Cc: platform-driver-x86@...r.kernel.org, dvhart@...radead.org,
rkhan@...hat.com, alexander.h.duyck@...hat.com,
netdev@...r.kernel.org, linux-acpi@...r.kernel.org
Subject: Re: [PATCH 22/22] fjes: ethtool support
On Thu, 18 Jun 2015 09:49:47 +0900
Taku Izumi <izumi.taku@...fujitsu.com> wrote:
> +static void fjes_get_ethtool_stats(struct net_device *netdev,
> + struct ethtool_stats *stats, u64 *data)
> +{
> + struct fjes_adapter *adapter = netdev_priv(netdev);
> + int i;
> + char *p = NULL;
Although harmless, this initialization is unnecessary.
> + for (i = 0; i < ARRAY_SIZE(fjes_gstrings_stats); i++) {
> + p = (char *)adapter + fjes_gstrings_stats[i].stat_offset;
> + data[i] = (fjes_gstrings_stats[i].sizeof_stat == sizeof(u64))
> + ? *(u64 *)p : *(u32 *)p;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists