All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harman Kalra <harman4linux@gmail.com>
To: tj@kernel.org, linux-ide@vger.kernel.org
Cc: Harman Kalra <harman4linux@gmail.com>
Subject: [PATCH] ata: sata_mv: Replacing dma_pool_alloc and memset with a single call  dma_pool_zalloc.
Date: Wed, 21 Sep 2016 01:14:40 +0530	[thread overview]
Message-ID: <1474400680-12254-1-git-send-email-harman4linux@gmail.com> (raw)

Replacing dma_pool_alloc and memset with a single call to dma_pool_zalloc

Signed-off-by: Harman Kalra <harman4linux@gmail.com>
---
 drivers/ata/sata_mv.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 745489a..efc48bf 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)
 		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)
-- 
1.7.9.5


             reply	other threads:[~2016-09-20 19:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-20 19:44 Harman Kalra [this message]
2016-09-20 20:08 ` [PATCH] ata: sata_mv: Replacing dma_pool_alloc and memset with a single call dma_pool_zalloc Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1474400680-12254-1-git-send-email-harman4linux@gmail.com \
    --to=harman4linux@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.