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
@@ -714,7 +714,6 @@ au1000_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
|
||||
strlcpy(info->version, DRV_VERSION, sizeof(info->version));
|
||||
snprintf(info->bus_info, sizeof(info->bus_info), "%s %d", DRV_NAME,
|
||||
aup->mac_id);
|
||||
info->regdump_len = 0;
|
||||
}
|
||||
|
||||
static void au1000_set_msglevel(struct net_device *dev, u32 value)
|
||||
|
@@ -375,7 +375,6 @@ static void xgbe_get_drvinfo(struct net_device *netdev,
|
||||
XGMAC_GET_BITS(hw_feat->version, MAC_VR, USERVER),
|
||||
XGMAC_GET_BITS(hw_feat->version, MAC_VR, DEVID),
|
||||
XGMAC_GET_BITS(hw_feat->version, MAC_VR, SNPSVER));
|
||||
drvinfo->n_stats = XGBE_STATS_COUNT;
|
||||
}
|
||||
|
||||
static u32 xgbe_get_msglevel(struct net_device *netdev)
|
||||
|
Reference in New Issue
Block a user