Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 47ea0325 authored by Ivan Vecera's avatar Ivan Vecera Committed by David S. Miller
Browse files

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: default avatarIvan Vecera <ivecera@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ae230518
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -1325,9 +1325,6 @@ static void nes_netdev_get_drvinfo(struct net_device *netdev,
		 "%u.%u", nesadapter->firmware_version >> 16,
		 nesadapter->firmware_version & 0x000000ff);
	strlcpy(drvinfo->version, DRV_VERSION, sizeof(drvinfo->version));
	drvinfo->testinfo_len = 0;
	drvinfo->eedump_len = 0;
	drvinfo->regdump_len = 0;
}


+0 −2
Original line number Diff line number Diff line
@@ -1141,8 +1141,6 @@ static void greth_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *in
	strlcpy(info->version, "revision: 1.0", sizeof(info->version));
	strlcpy(info->bus_info, greth->dev->bus->name, sizeof(info->bus_info));
	strlcpy(info->fw_version, "N/A", sizeof(info->fw_version));
	info->eedump_len = 0;
	info->regdump_len = sizeof(struct greth_regs);
}

static void greth_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *p)
+0 −1
Original line number Diff line number Diff line
@@ -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)
+0 −1
Original line number Diff line number Diff line
@@ -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)
+0 −4
Original line number Diff line number Diff line
@@ -233,10 +233,6 @@ static void atl1c_get_drvinfo(struct net_device *netdev,
		sizeof(drvinfo->version));
	strlcpy(drvinfo->bus_info, pci_name(adapter->pdev),
		sizeof(drvinfo->bus_info));
	drvinfo->n_stats = 0;
	drvinfo->testinfo_len = 0;
	drvinfo->regdump_len = atl1c_get_regs_len(netdev);
	drvinfo->eedump_len = atl1c_get_eeprom_len(netdev);
}

static void atl1c_get_wol(struct net_device *netdev,
Loading