drivers/net: get rid of unnecessary initializations in .get_drvinfo()
Many drivers initialize uselessly n_priv_flags, n_stats, testinfo_len, eedump_len & regdump_len fields in their .get_drvinfo() ethtool op. It's not necessary as these fields is filled in ethtool_get_drvinfo(). v2: removed unused variable v3: removed another unused variable Signed-off-by: Ivan Vecera <ivecera@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
ae23051820
commit
47ea032533
@@ -470,14 +470,10 @@ static int sr_get_eeprom(struct net_device *net,
|
||||
static void sr_get_drvinfo(struct net_device *net,
|
||||
struct ethtool_drvinfo *info)
|
||||
{
|
||||
struct usbnet *dev = netdev_priv(net);
|
||||
struct sr_data *data = (struct sr_data *)&dev->data;
|
||||
|
||||
/* Inherit standard device info */
|
||||
usbnet_get_drvinfo(net, info);
|
||||
strncpy(info->driver, DRIVER_NAME, sizeof(info->driver));
|
||||
strncpy(info->version, DRIVER_VERSION, sizeof(info->version));
|
||||
info->eedump_len = data->eeprom_len;
|
||||
}
|
||||
|
||||
static u32 sr_get_link(struct net_device *net)
|
||||
|
Reference in New Issue
Block a user