mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-09 12:24:07 -05:00
block: Use dma_zalloc_coherent
Use the zeroing function instead of dma_alloc_coherent & memset(,0,) Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Matthew Wilcox <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
e167dfb53c
commit
4d51abf9bc
1 changed files with 2 additions and 3 deletions
|
|
@ -1275,11 +1275,10 @@ static struct nvme_queue *nvme_alloc_queue(struct nvme_dev *dev, int qid,
|
|||
if (!nvmeq)
|
||||
return NULL;
|
||||
|
||||
nvmeq->cqes = dma_alloc_coherent(dmadev, CQ_SIZE(depth),
|
||||
&nvmeq->cq_dma_addr, GFP_KERNEL);
|
||||
nvmeq->cqes = dma_zalloc_coherent(dmadev, CQ_SIZE(depth),
|
||||
&nvmeq->cq_dma_addr, GFP_KERNEL);
|
||||
if (!nvmeq->cqes)
|
||||
goto free_nvmeq;
|
||||
memset((void *)nvmeq->cqes, 0, CQ_SIZE(depth));
|
||||
|
||||
nvmeq->sq_cmds = dma_alloc_coherent(dmadev, SQ_SIZE(depth),
|
||||
&nvmeq->sq_dma_addr, GFP_KERNEL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue