From: Souptick Joarder <jrdr.linux@gmail.com>
To: QLogic-Storage-Upstream@qlogic.com
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH] scsi: qla4xxx: Use dma_pool_zalloc
Date: Wed, 7 Dec 2016 01:53:04 +0530 [thread overview]
Message-ID: <20161206202304.GA6884@jordon-HP-15-Notebook-PC> (raw)
We should use dma_pool_zalloc instead of dma_pool_alloc/memset
Signed-off-by: Souptick joarder <jrdr.linux@gmail.com>
---
drivers/scsi/qla4xxx/ql4_mbx.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c
index c291fdf..f2edfd7 100644
--- a/drivers/scsi/qla4xxx/ql4_mbx.c
+++ b/drivers/scsi/qla4xxx/ql4_mbx.c
@@ -1587,12 +1587,11 @@ int qla4xxx_get_chap(struct scsi_qla_host *ha, char *username, char *password,
struct ql4_chap_table *chap_table;
dma_addr_t chap_dma;
- chap_table = dma_pool_alloc(ha->chap_dma_pool, GFP_KERNEL, &chap_dma);
+ chap_table = dma_pool_zalloc(ha->chap_dma_pool, GFP_KERNEL, &chap_dma);
if (chap_table == NULL)
return -ENOMEM;
chap_size = sizeof(struct ql4_chap_table);
- memset(chap_table, 0, chap_size);
if (is_qla40XX(ha))
offset = FLASH_CHAP_OFFSET | (idx * chap_size);
--
1.9.1
next reply other threads:[~2016-12-06 20:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 20:23 Souptick Joarder [this message]
2016-12-12 4:46 ` [PATCH] scsi: qla4xxx: Use dma_pool_zalloc Souptick Joarder
2016-12-13 10:41 ` Javali, Nilesh
2016-12-13 13:05 ` Souptick Joarder
2016-12-21 11:43 ` Javali, Nilesh
2016-12-21 13:24 ` Souptick Joarder
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=20161206202304.GA6884@jordon-HP-15-Notebook-PC \
--to=jrdr.linux@gmail.com \
--cc=QLogic-Storage-Upstream@qlogic.com \
--cc=linux-scsi@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox