Commit c39a4d75 authored by Souptick Joarder's avatar Souptick Joarder Committed by Martin K. Petersen

scsi: mpt3sas: Use dma_pool_zalloc

Replaced dma_pool_alloc + memset with dma_pool_zalloc.
Signed-off-by: default avatarBrajeswar Ghosh <brajeswar.linux@gmail.com>
Signed-off-by: default avatarSouptick Joarder <jrdr.linux@gmail.com>
Acked-by: default avatarSuganath Prabu <suganath-prabu.subramani@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 16e8b963
...@@ -4463,14 +4463,13 @@ _base_allocate_memory_pools(struct MPT3SAS_ADAPTER *ioc) ...@@ -4463,14 +4463,13 @@ _base_allocate_memory_pools(struct MPT3SAS_ADAPTER *ioc)
i = 0; i = 0;
do { do {
ioc->reply_post[i].reply_post_free = ioc->reply_post[i].reply_post_free =
dma_pool_alloc(ioc->reply_post_free_dma_pool, dma_pool_zalloc(ioc->reply_post_free_dma_pool,
GFP_KERNEL, GFP_KERNEL,
&ioc->reply_post[i].reply_post_free_dma); &ioc->reply_post[i].reply_post_free_dma);
if (!ioc->reply_post[i].reply_post_free) { if (!ioc->reply_post[i].reply_post_free) {
ioc_err(ioc, "reply_post_free pool: dma_pool_alloc failed\n"); ioc_err(ioc, "reply_post_free pool: dma_pool_alloc failed\n");
goto out; goto out;
} }
memset(ioc->reply_post[i].reply_post_free, 0, sz);
dinitprintk(ioc, dinitprintk(ioc,
ioc_info(ioc, "reply post free pool (0x%p): depth(%d), element_size(%d), pool_size(%d kB)\n", ioc_info(ioc, "reply post free pool (0x%p): depth(%d), element_size(%d), pool_size(%d kB)\n",
ioc->reply_post[i].reply_post_free, ioc->reply_post[i].reply_post_free,
...@@ -4781,13 +4780,12 @@ _base_allocate_memory_pools(struct MPT3SAS_ADAPTER *ioc) ...@@ -4781,13 +4780,12 @@ _base_allocate_memory_pools(struct MPT3SAS_ADAPTER *ioc)
ioc_err(ioc, "reply_free pool: dma_pool_create failed\n"); ioc_err(ioc, "reply_free pool: dma_pool_create failed\n");
goto out; goto out;
} }
ioc->reply_free = dma_pool_alloc(ioc->reply_free_dma_pool, GFP_KERNEL, ioc->reply_free = dma_pool_zalloc(ioc->reply_free_dma_pool, GFP_KERNEL,
&ioc->reply_free_dma); &ioc->reply_free_dma);
if (!ioc->reply_free) { if (!ioc->reply_free) {
ioc_err(ioc, "reply_free pool: dma_pool_alloc failed\n"); ioc_err(ioc, "reply_free pool: dma_pool_alloc failed\n");
goto out; goto out;
} }
memset(ioc->reply_free, 0, sz);
dinitprintk(ioc, dinitprintk(ioc,
ioc_info(ioc, "reply_free pool(0x%p): depth(%d), element_size(%d), pool_size(%d kB)\n", ioc_info(ioc, "reply_free pool(0x%p): depth(%d), element_size(%d), pool_size(%d kB)\n",
ioc->reply_free, ioc->reply_free_queue_depth, ioc->reply_free, ioc->reply_free_queue_depth,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment