From: Sabyasachi Gupta <sabyasachi.linux@gmail.com>
To: jejb@linux.vnet.ibm.com, martin.petersen@oracle.com,
keescook@chromium.org, john.garry@huawei.com,
jinpu.wang@profitbricks.com
Cc: jrdr.linux@gmail.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, brajeswar.linux@gmail.com
Subject: [PATCH] scsi/mvsas/mv_sas.c: Use dma_pool_zalloc
Date: Thu, 18 Oct 2018 21:36:26 +0530 [thread overview]
Message-ID: <5bc8af85.1c69fb81.3eebc.a22b@mx.google.com> (raw)
Replaced dma_pool_alloc + memset with dma_pool_zalloc
Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@gmail.com>
---
drivers/scsi/mvsas/mv_sas.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
index cff43bd..d00d37d 100644
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -790,12 +790,11 @@ static int mvs_task_prep(struct sas_task *task, struct mvs_info *mvi, int is_tmf
slot->n_elem = n_elem;
slot->slot_tag = tag;
- slot->buf = dma_pool_alloc(mvi->dma_pool, GFP_ATOMIC, &slot->buf_dma);
+ slot->buf = dma_pool_zalloc(mvi->dma_pool, GFP_ATOMIC, &slot->buf_dma);
if (!slot->buf) {
rc = -ENOMEM;
goto err_out_tag;
}
- memset(slot->buf, 0, MVS_SLOT_BUF_SZ);
tei.task = task;
tei.hdr = &mvi->slot[tag];
--
2.7.4
next reply other threads:[~2018-10-18 16:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-18 16:06 Sabyasachi Gupta [this message]
2018-10-18 16:18 ` [PATCH] scsi/mvsas/mv_sas.c: Use dma_pool_zalloc Jinpu Wang
2018-10-18 16:32 ` John Garry
2018-10-24 1:26 ` Martin K. Petersen
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=5bc8af85.1c69fb81.3eebc.a22b@mx.google.com \
--to=sabyasachi.linux@gmail.com \
--cc=brajeswar.linux@gmail.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=jinpu.wang@profitbricks.com \
--cc=john.garry@huawei.com \
--cc=jrdr.linux@gmail.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).