Skip to content

Commit

Permalink
dmaengine: qcom_hidma: Remove call to memset after dmam_alloc_coherent
Browse files Browse the repository at this point in the history
In commit 518a2f1
("dma-mapping: zero memory returned from dma_alloc_*"),
dma_alloc_coherent has already zeroed the memory.
So memset is not needed.

Signed-off-by: Fuqian Huang <[email protected]>
Acked-by: Sinan Kaya <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
  • Loading branch information
Yellow-Pay authored and vinodkoul committed Aug 8, 2019
1 parent 9603a7a commit 719e25d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/dma/qcom/hidma_ll.c
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,6 @@ struct hidma_lldev *hidma_ll_init(struct device *dev, u32 nr_tres,
if (!lldev->tre_ring)
return NULL;

memset(lldev->tre_ring, 0, (HIDMA_TRE_SIZE + 1) * nr_tres);
lldev->tre_ring_size = HIDMA_TRE_SIZE * nr_tres;
lldev->nr_tres = nr_tres;

Expand All @@ -769,7 +768,6 @@ struct hidma_lldev *hidma_ll_init(struct device *dev, u32 nr_tres,
if (!lldev->evre_ring)
return NULL;

memset(lldev->evre_ring, 0, (HIDMA_EVRE_SIZE + 1) * nr_tres);
lldev->evre_ring_size = HIDMA_EVRE_SIZE * nr_tres;

/* the EVRE ring has to be EVRE_SIZE aligned */
Expand Down

0 comments on commit 719e25d

Please sign in to comment.