From: Joe Perches <joe@perches.com> To: linux-kernel@vger.kernel.org Cc: Matthew Wilcox <willy@linux.intel.com>, linux-nvme@lists.infradead.org Subject: [PATCH -next 04/26] block: Use dma_zalloc_coherent Date: Sun, 15 Jun 2014 13:37:33 -0700 [thread overview] Message-ID: <ff8b612a77e9c4d5826df68b3e6fe27b800610e9.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/block/nvme-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c index a842c71..27b5d3b 100644 --- a/drivers/block/nvme-core.c +++ b/drivers/block/nvme-core.c @@ -1242,11 +1242,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); -- 1.8.1.2.459.gbcd45b4.dirty
WARNING: multiple messages have this Message-ID (diff)
From: joe@perches.com (Joe Perches) Subject: [PATCH -next 04/26] block: Use dma_zalloc_coherent Date: Sun, 15 Jun 2014 13:37:33 -0700 [thread overview] Message-ID: <ff8b612a77e9c4d5826df68b3e6fe27b800610e9.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 at perches.com> --- drivers/block/nvme-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c index a842c71..27b5d3b 100644 --- a/drivers/block/nvme-core.c +++ b/drivers/block/nvme-core.c @@ -1242,11 +1242,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); -- 1.8.1.2.459.gbcd45b4.dirty
next prev parent reply other threads:[~2014-06-15 20:45 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 ` Joe Perches [this message] 2014-06-15 20:37 ` [PATCH -next 04/26] block: " 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 ` [PATCH -next 09/26] mmc: " Joe Perches 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=ff8b612a77e9c4d5826df68b3e6fe27b800610e9.1402863905.git.joe@perches.com \ --to=joe@perches.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-nvme@lists.infradead.org \ --cc=willy@linux.intel.com \ /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: linkBe 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.