mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 25/87] infiniband: mthca: remove memset after dma_alloc_coherent in mthca_allocator.c
@ 2019-06-27 17:37 Fuqian Huang
  0 siblings, 0 replies; only message in thread
From: Fuqian Huang @ 2019-06-27 17:37 UTC (permalink / raw)
  Cc: Fuqian Huang, Doug Ledford, Jason Gunthorpe, linux-rdma, linux-kernel

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@gmail.com>
---
 drivers/infiniband/hw/mthca/mthca_allocator.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/infiniband/hw/mthca/mthca_allocator.c b/drivers/infiniband/hw/mthca/mthca_allocator.c
index aaf10dd5364d..aef1d274a14e 100644
--- a/drivers/infiniband/hw/mthca/mthca_allocator.c
+++ b/drivers/infiniband/hw/mthca/mthca_allocator.c
@@ -214,8 +214,6 @@ int mthca_buf_alloc(struct mthca_dev *dev, int size, int max_direct,
 
 		dma_unmap_addr_set(&buf->direct, mapping, t);
 
-		memset(buf->direct.buf, 0, size);
-
 		while (t & ((1 << shift) - 1)) {
 			--shift;
 			npages *= 2;
-- 
2.11.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-06-27 17:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-27 17:37 [PATCH 25/87] infiniband: mthca: remove memset after dma_alloc_coherent in mthca_allocator.c Fuqian Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®