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 platform-driver-x86" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux