diff options
author | Souptick Joarder <jrdr.linux@gmail.com> | 2018-10-02 07:48:04 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-10-11 04:04:36 +0200 |
commit | c39a4d755393936d406516e32faf925f167bcfe5 (patch) | |
tree | 2d243d4d8bedb4a957ba2632415db8f28bf41672 /drivers/scsi/mpt3sas/mpt3sas_base.c | |
parent | scsi: mpt3sas: Remove unused macro MPT3SAS_FMT (diff) | |
download | linux-c39a4d755393936d406516e32faf925f167bcfe5.tar.xz linux-c39a4d755393936d406516e32faf925f167bcfe5.zip |
scsi: mpt3sas: Use dma_pool_zalloc
Replaced dma_pool_alloc + memset with dma_pool_zalloc.
Signed-off-by: Brajeswar Ghosh <brajeswar.linux@gmail.com>
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
Acked-by: Suganath Prabu <suganath-prabu.subramani@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mpt3sas/mpt3sas_base.c')
-rw-r--r-- | drivers/scsi/mpt3sas/mpt3sas_base.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index cf5a21717a6f..4f51cee8f2c7 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -4463,14 +4463,13 @@ _base_allocate_memory_pools(struct MPT3SAS_ADAPTER *ioc) i = 0; do { 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, &ioc->reply_post[i].reply_post_free_dma); if (!ioc->reply_post[i].reply_post_free) { ioc_err(ioc, "reply_post_free pool: dma_pool_alloc failed\n"); goto out; } - memset(ioc->reply_post[i].reply_post_free, 0, sz); dinitprintk(ioc, 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, @@ -4781,13 +4780,12 @@ _base_allocate_memory_pools(struct MPT3SAS_ADAPTER *ioc) ioc_err(ioc, "reply_free pool: dma_pool_create failed\n"); 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); if (!ioc->reply_free) { ioc_err(ioc, "reply_free pool: dma_pool_alloc failed\n"); goto out; } - memset(ioc->reply_free, 0, sz); dinitprintk(ioc, 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, |