]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
drivers/net: get rid of unnecessary initializations in .get_drvinfo()
authorIvan Vecera <ivecera@redhat.com>
Thu, 15 Oct 2015 19:28:52 +0000 (21:28 +0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 10 Mar 2016 15:11:32 +0000 (07:11 -0800)
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>
Signed-off-by: Suresh Reddy <suresh.reddy@avagotech.com>
Signed-off-by: Suresh Reddy <suresh.reddy@broadcom.com>
Orabug: 22725582
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
drivers/net/ethernet/emulex/benet/be_ethtool.c

index 2c9ed1710ba6f4c16d8a3d800602b6d2337abb59..f4cb8e425853a3fd85151d3b6df5e7651b95f81a 100644 (file)
@@ -234,9 +234,6 @@ static void be_get_drvinfo(struct net_device *netdev,
 
        strlcpy(drvinfo->bus_info, pci_name(adapter->pdev),
                sizeof(drvinfo->bus_info));
-       drvinfo->testinfo_len = 0;
-       drvinfo->regdump_len = 0;
-       drvinfo->eedump_len = 0;
 }
 
 static u32 lancer_cmd_get_file_len(struct be_adapter *adapter, u8 *file_name)