All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: linux-kernel@vger.kernel.org
Cc: David Brown <davidb@codeaurora.org>,
	Daniel Walker <dwalker@fifo99.com>,
	Bryan Huntsman <bryanh@codeaurora.org>,
	Chris Ball <chris@printf.net>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	linux-arm-msm@vger.kernel.org, linux-mmc@vger.kernel.org
Subject: [PATCH -next 09/26] mmc: Use dma_zalloc_coherent
Date: Sun, 15 Jun 2014 13:37:38 -0700	[thread overview]
Message-ID: <1bcfedf9f6f944be57f4076d8b248a9f248a3f5d.1402863905.git.joe@perches.com> (raw)
In-Reply-To: <cover.1402863904.git.joe@perches.com>

Use the zeroing function instead of dma_alloc_coherent & memset(,0,)

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/mmc/host/msm_sdcc.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c
index 9405ecd..3035d84 100644
--- a/drivers/mmc/host/msm_sdcc.c
+++ b/drivers/mmc/host/msm_sdcc.c
@@ -1146,15 +1146,13 @@ msmsdcc_init_dma(struct msmsdcc_host *host)
 	if (!host->dmares)
 		return -ENODEV;
 
-	host->dma.nc = dma_alloc_coherent(NULL,
-					  sizeof(struct msmsdcc_nc_dmadata),
-					  &host->dma.nc_busaddr,
-					  GFP_KERNEL);
+	host->dma.nc = dma_zalloc_coherent(NULL,
+					   sizeof(struct msmsdcc_nc_dmadata),
+					   &host->dma.nc_busaddr, GFP_KERNEL);
 	if (host->dma.nc == NULL) {
 		pr_err("Unable to allocate DMA buffer\n");
 		return -ENOMEM;
 	}
-	memset(host->dma.nc, 0x00, sizeof(struct msmsdcc_nc_dmadata));
 	host->dma.cmd_busaddr = host->dma.nc_busaddr;
 	host->dma.cmdptr_busaddr = host->dma.nc_busaddr +
 				offsetof(struct msmsdcc_nc_dmadata, cmdptr);
-- 
1.8.1.2.459.gbcd45b4.dirty

  parent reply	other threads:[~2014-06-15 20:37 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-15 20:37 [PATCH -next 00/26] treewide: Use dma_zalloc_coherent Joe Perches
2014-06-15 20:37 ` Joe Perches
2014-06-15 20:37 ` Joe Perches
2014-06-15 20:37 ` Joe Perches
2014-06-15 20:37 ` Joe Perches
2014-06-15 20:37 ` [PATCH -next 01/26] powerpc: " Joe Perches
2014-06-15 20:37   ` Joe Perches
2014-06-15 20:37 ` [PATCH -next 02/26] sh: " Joe Perches
2014-06-15 20:37   ` Joe Perches
2014-06-15 20:37 ` [PATCH -next 03/26] ata: " Joe Perches
2014-06-17 14:23   ` Tejun Heo
2014-06-15 20:37 ` [PATCH -next 04/26] block: " Joe Perches
2014-06-15 20:37   ` Joe Perches
2014-06-28 12:52   ` Matthew Wilcox
2014-06-28 12:52     ` Matthew Wilcox
2014-06-15 20:37 ` [PATCH -next 05/26] crypto: " Joe Perches
2014-06-15 20:37 ` [PATCH -next 06/26] dma: " Joe Perches
2014-07-14 17:00   ` Vinod Koul
2014-06-15 20:37 ` [PATCH -next 07/26] gpu: " Joe Perches
2014-06-15 20:37   ` Joe Perches
2014-06-15 20:37 ` [PATCH -next 08/26] infiniband: " Joe Perches
     [not found]   ` <fc94266778d11e0faa0011efed23b1915a4eaa2a.1402863905.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2014-06-16 13:20     ` Steve Wise
2014-06-16 13:20       ` Steve Wise
2014-06-15 20:37 ` Joe Perches [this message]
2014-06-15 20:37 ` [PATCH -next 10/26] broadcom: " Joe Perches
2014-06-15 20:37 ` [PATCH -next 11/26] hisilicon: " Joe Perches
2014-06-15 20:37 ` [PATCH -next 12/26] intel: " Joe Perches
2014-06-15 20:37   ` Joe Perches
2014-06-16 21:15   ` Jeff Kirsher
2014-06-15 20:37 ` [PATCH -next 13/26] ath: " Joe Perches
2014-06-15 20:37   ` Joe Perches
2014-06-16  9:24   ` Kalle Valo
2014-06-16  9:24     ` Kalle Valo
2014-06-15 20:37 ` [PATCH -next 14/26] rt2x00: " Joe Perches
2014-06-15 20:37   ` Joe Perches
2014-06-15 20:37 ` [PATCH -next 15/26] bfa: " Joe Perches
2014-06-16  6:31   ` Anil Gurumurthy
2014-06-16  6:31     ` Anil Gurumurthy
2014-06-15 20:37 ` [PATCH -next 16/26] bnx2fc: " Joe Perches
2014-06-15 20:37 ` [PATCH -next 17/26] bnx2i: " Joe Perches
2014-06-15 20:37 ` [PATCH -next 18/26] dpt_i2o: " Joe Perches
2014-06-15 20:37 ` [PATCH -next 19/26] lpfc: " Joe Perches
2014-06-15 20:37 ` [PATCH -next 20/26] megaraid: " Joe Perches
2014-06-15 20:37 ` [PATCH -next 21/26] mvsas: " Joe Perches
2014-06-15 20:37 ` [PATCH -next 22/26] qla2xxx: " Joe Perches
2014-06-16  6:16   ` Saurav Kashyap
2014-06-16  6:16     ` Saurav Kashyap
2014-06-15 20:37 ` [PATCH -next 23/26] qla4xxx: " Joe Perches
2014-06-15 20:37 ` [PATCH -next 24/26] usb: " Joe Perches
2014-06-15 22:02   ` Alan Stern
2014-06-15 23:32     ` Joe Perches
2014-06-16 22:00   ` Paul Zimmerman
2014-06-17  0:30     ` Joe Perches
2014-06-15 20:37 ` [PATCH -next 25/26] fbdev: " Joe Perches
2014-06-15 20:37   ` Joe Perches
2014-06-15 22:16   ` Geert Uytterhoeven
2014-06-15 22:16     ` Geert Uytterhoeven
2014-06-15 23:32     ` Joe Perches
2014-06-15 23:32       ` Joe Perches
2014-06-23 11:53   ` Tomi Valkeinen
2014-06-23 11:53     ` Tomi Valkeinen
2014-06-15 20:37 ` [PATCH -next 26/26] sound: " Joe Perches
2014-06-15 20:37   ` Joe Perches
2014-06-15 20:37   ` Joe Perches
2014-06-16  9:40   ` Takashi Iwai
2014-06-16  9:40     ` Takashi Iwai

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=1bcfedf9f6f944be57f4076d8b248a9f248a3f5d.1402863905.git.joe@perches.com \
    --to=joe@perches.com \
    --cc=bryanh@codeaurora.org \
    --cc=chris@printf.net \
    --cc=davidb@codeaurora.org \
    --cc=dwalker@fifo99.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.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.