Re: [PATCH RFC 06/10] dpaa_eth: add ethtool functionality
From: Madalin-Cristian Bucur <hidden>
Date: 2015-04-03 08:54:41
Also in:
lkml, netdev
From: Madalin-Cristian Bucur <hidden>
Date: 2015-04-03 08:54:41
Also in:
lkml, netdev
-----Original Message----- From: Joe Perches [mailto:joe@perches.com] On Wed, 2015-04-01 at 19:19 +0300, Madalin Bucur wrote:quoted
Add support for basic ethtool operations.=20quoted
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.cb/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c []quoted
+static int __cold dpa_get_settings(struct net_device *net_dev, + struct ethtool_cmd *et_cmd) +{ + int _errno;=20 Using a variable name of _errno is misleading at best, (btw: the only return value for phy_ethtool_gset is 0)
I'll rename all miss-used occurrences of _errno. =20
quoted
+static void __cold dpa_get_drvinfo(struct net_device *net_dev, + struct ethtool_drvinfo *drvinfo) +{ + int _errno; + + strncpy(drvinfo->driver, KBUILD_MODNAME, + sizeof(drvinfo->driver) - 1)[sizeof(drvinfo->driver) - 1] =3D 0;=20 That's a really odd and unusual construct more commonly written as strlcpy
I will change this.
quoted
+ _errno =3D snprintf(drvinfo->version, sizeof(drvinfo->version),=20 Using errno here is especially misleading as that's not the return value of an snprintf
I will take care of this one too. Thank you, Madalin