Skip to contentSkip to conversation

ata: sata_mv: Replacing dma_pool_alloc and memset with a single call dma_pool_zalloc.

PATCH Applied Harman Kalra 2 participants 2 messages Sep 20, 2016 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ata: sata_mv: Replacing dma_pool_alloc and memset with a single call dma_pool_zalloc.

Replacing dma_pool_alloc and memset with a single call to dma_pool_zalloc

---
 drivers/ata/sata_mv.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/ata/sata_mv.c +2 -4
index 745489a..efc48bf 100644
@@ -1727,15 +1727,13 @@ static int mv_port_start(struct ata_port *ap)
 		return -ENOMEM;
 	ap->private_data = pp;
 
-	pp->crqb = dma_pool_alloc(hpriv->crqb_pool, GFP_KERNEL, &pp->crqb_dma);
+	pp->crqb = dma_pool_zalloc(hpriv->crqb_pool, GFP_KERNEL, &pp->crqb_dma);
 	if (!pp->crqb)
 		return -ENOMEM;
-	memset(pp->crqb, 0, MV_CRQB_Q_SZ);
 
-	pp->crpb = dma_pool_alloc(hpriv->crpb_pool, GFP_KERNEL, &pp->crpb_dma);
+	pp->crpb = dma_pool_zalloc(hpriv->crpb_pool, GFP_KERNEL, &pp->crpb_dma);
 	if (!pp->crpb)
 		goto out_port_free_dma_mem;
-	memset(pp->crpb, 0, MV_CRPB_Q_SZ);
 
 	/* 6041/6081 Rev. "C0" (and newer) are okay with async notify */
 	if (hpriv->hp_flags & MV_HP_ERRATA_60X1C0)
Signature · 1 line
1.7.9.5
Applied
#1 lore raw
Quoted 3 lines · Harman Kalra

Replacing dma_pool_alloc and memset with a single call to dma_pool_zalloc

Applied to libata/for-4.9.

Thanks.

Signature · 1 line
tejun