diff options
author | Harman Kalra <harman4linux@gmail.com> | 2016-09-20 15:44:40 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2016-09-20 16:07:16 -0400 |
commit | 6ec76070f17993aa9ac0344330b971783d10c9c2 (patch) | |
tree | ded77f08641ca80c4adc63f87477b201d0a7febc | |
parent | 0ce1b18c42a5b1613ad84d3bf93ee4f5bb3f8b33 (diff) |
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
Signed-off-by: Harman Kalra <harman4linux@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r-- | drivers/ata/sata_mv.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 745489a1c86a..efc48bf89d51 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -1727,15 +1727,13 @@ static int mv_port_start(struct ata_port *ap) | |||
1727 | return -ENOMEM; | 1727 | return -ENOMEM; |
1728 | ap->private_data = pp; | 1728 | ap->private_data = pp; |
1729 | 1729 | ||
1730 | pp->crqb = dma_pool_alloc(hpriv->crqb_pool, GFP_KERNEL, &pp->crqb_dma); | 1730 | pp->crqb = dma_pool_zalloc(hpriv->crqb_pool, GFP_KERNEL, &pp->crqb_dma); |
1731 | if (!pp->crqb) | 1731 | if (!pp->crqb) |
1732 | return -ENOMEM; | 1732 | return -ENOMEM; |
1733 | memset(pp->crqb, 0, MV_CRQB_Q_SZ); | ||
1734 | 1733 | ||
1735 | pp->crpb = dma_pool_alloc(hpriv->crpb_pool, GFP_KERNEL, &pp->crpb_dma); | 1734 | pp->crpb = dma_pool_zalloc(hpriv->crpb_pool, GFP_KERNEL, &pp->crpb_dma); |
1736 | if (!pp->crpb) | 1735 | if (!pp->crpb) |
1737 | goto out_port_free_dma_mem; | 1736 | goto out_port_free_dma_mem; |
1738 | memset(pp->crpb, 0, MV_CRPB_Q_SZ); | ||
1739 | 1737 | ||
1740 | /* 6041/6081 Rev. "C0" (and newer) are okay with async notify */ | 1738 | /* 6041/6081 Rev. "C0" (and newer) are okay with async notify */ |
1741 | if (hpriv->hp_flags & MV_HP_ERRATA_60X1C0) | 1739 | if (hpriv->hp_flags & MV_HP_ERRATA_60X1C0) |