IB: Remove unneeded memset
In commit af7ddd8a62
("Merge tag 'dma-mapping-4.21' of
git://git.infradead.org/users/hch/dma-mapping"),
dma_alloc_coherent/dmam_alloc_coherent always zeroed the returned memory.
So the memset after a coherent allocation function is not needed.
Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user