Thread (33 messages) 33 messages, 6 authors, 2015-06-19

Re: [PATCH 22/22] fjes: ethtool support

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2015-06-18 01:10:20
Also in: linux-acpi, platform-driver-x86

On Thu, 18 Jun 2015 09:49:47 +0900
Taku Izumi [off-list ref] 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;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help