diff options
author | 2017-10-23 19:51:06 +0800 | |
---|---|---|
committer | 2017-10-24 01:16:42 +0100 | |
commit | 51145dae2748233315a7a411cd97f4bedf8cc22f (patch) | |
tree | 7685626117e531b8a4f523e1f68a96f00dc5d071 /drivers/net/ethernet/hisilicon | |
parent | net: hns3: fix the TX/RX ring.queue_index in hns3_ring_get_cfg (diff) | |
download | linux-51145dae2748233315a7a411cd97f4bedf8cc22f.tar.gz linux-51145dae2748233315a7a411cd97f4bedf8cc22f.tar.bz2 linux-51145dae2748233315a7a411cd97f4bedf8cc22f.zip |
net: hns3: remove redundant memset when alloc buffer
HW will use packet length to write packets to buffer or read
packets from buffer. There is a redundant memset when alloc buffer,
the memset have no sense and will increase time-consuming.
This patch removes it.
Fixes: 76ad4f0 (net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC)
Signed-off-by: Lipeng <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c index 14de0f7581c8..06af3c86b60c 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c @@ -1444,8 +1444,6 @@ static int hns3_alloc_buffer(struct hns3_enet_ring *ring, cb->length = hnae_page_size(ring); cb->type = DESC_TYPE_PAGE; - memset(cb->buf, 0, cb->length); - return 0; } |