[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190627174452.5677-1-huangfq.daxian@gmail.com>
Date: Fri, 28 Jun 2019 01:44:51 +0800
From: Fuqian Huang <huangfq.daxian@...il.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Fuqian Huang <huangfq.daxian@...il.com>,
Jes Sorensen <jes@...ined-monkey.org>,
"David S. Miller" <davem@...emloft.net>, linux-hippi@...site.dk,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 80/87] net: hippi: remove memset after pci_alloc_consistent
pci_alloc_consistent calls dma_alloc_coherent directly.
In commit af7ddd8a627c
("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"),
dma_alloc_coherent has already zeroed the memory.
So memset is not needed.
Signed-off-by: Fuqian Huang <huangfq.daxian@...il.com>
---
drivers/net/hippi/rrunner.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/hippi/rrunner.c b/drivers/net/hippi/rrunner.c
index 7b9350dbebdd..2a6ec5394966 100644
--- a/drivers/net/hippi/rrunner.c
+++ b/drivers/net/hippi/rrunner.c
@@ -1196,7 +1196,6 @@ static int rr_open(struct net_device *dev)
goto error;
}
rrpriv->rx_ctrl_dma = dma_addr;
- memset(rrpriv->rx_ctrl, 0, 256*sizeof(struct ring_ctrl));
rrpriv->info = pci_alloc_consistent(pdev, sizeof(struct rr_info),
&dma_addr);
@@ -1205,7 +1204,6 @@ static int rr_open(struct net_device *dev)
goto error;
}
rrpriv->info_dma = dma_addr;
- memset(rrpriv->info, 0, sizeof(struct rr_info));
wmb();
spin_lock_irqsave(&rrpriv->lock, flags);
--
2.11.0
Powered by blists - more mailing lists