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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 18 Jun 2015 09:49:47 +0900
Taku Izumi <izumi.taku@xxxxxxxxxxxxxx> 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 linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux