diff options
author | Yonglong Liu <liuyonglong@huawei.com> | 2021-03-23 15:41:09 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-03-24 12:07:21 -0700 |
commit | 7f8bcd915724f9485475b515c554b840278526bc (patch) | |
tree | c427e4df9ba4669d7269a67ed8c99b71bdc1c865 /drivers/net/ethernet/hisilicon/hns/hns_enet.c | |
parent | net: hns: remove unnecessary !! operation in hns_mac_config_sds_loopback_acpi() (diff) | |
download | linux-dev-7f8bcd915724f9485475b515c554b840278526bc.tar.xz linux-dev-7f8bcd915724f9485475b515c554b840278526bc.zip |
net: hns: remove redundant variable initialization
There are some variables in HNS driver will not being referenced
before assigned, so there is no need to init them.
Signed-off-by: Yonglong Liu <liuyonglong@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns/hns_enet.c')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns/hns_enet.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c b/drivers/net/ethernet/hisilicon/hns/hns_enet.c index c66a7a51198e..7a1a0a90a1a3 100644 --- a/drivers/net/ethernet/hisilicon/hns/hns_enet.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_enet.c @@ -872,7 +872,7 @@ out: static bool hns_nic_rx_fini_pro(struct hns_nic_ring_data *ring_data) { struct hnae_ring *ring = ring_data->ring; - int num = 0; + int num; bool rx_stopped; hns_update_rx_rate(ring); @@ -1881,7 +1881,7 @@ static void hns_nic_set_rx_mode(struct net_device *ndev) static void hns_nic_get_stats64(struct net_device *ndev, struct rtnl_link_stats64 *stats) { - int idx = 0; + int idx; u64 tx_bytes = 0; u64 rx_bytes = 0; u64 tx_pkts = 0; |