Re: [PATCH net-next v3 5/7] vmxnet3: add support for get_coalesce, set_coalesce ethtool operations
From: Ben Hutchings
Date: Tue Jun 14 2016 - 11:04:23 EST
On Mon, 2016-06-13 at 18:50 -0700, Shrikrishna Khare wrote:
[...]
> --- a/drivers/net/vmxnet3/vmxnet3_ethtool.c
> +++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c
> @@ -725,6 +725,164 @@ vmxnet3_set_rss(struct net_device *netdev, const u32 *p, const u8 *key,
> Â}
> Â#endif
> Â
> +static int
> +vmxnet3_get_coalesce(struct net_device *netdev, struct ethtool_coalesce *ec)
> +{
> + struct vmxnet3_adapter *adapter = netdev_priv(netdev);
> +
> + if (!VMXNET3_VERSION_GE_3(adapter))
> + return -EOPNOTSUPP;
> +
> + memset(ec, 0, sizeof(struct ethtool_coalesce));
[...]
The ethtool core already clears the structure, and it sets the cmd
field properly. ÂThis memset() should be removed.
Otherwise I think this is fine.
Ben.
Â
--
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ- Albert
Camus
Attachment:
signature.asc
Description: This is a digitally signed message part