linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi/mpt3sas: Use dma_pool_zalloc
@ 2018-10-02  5:48 Souptick Joarder
  2018-10-08 16:28 ` Souptick Joarder
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Souptick Joarder @ 2018-10-02  5:48 UTC (permalink / raw)
  To: sathya.prakash, chaitra.basappa, suganath-prabu.subramani, jejb,
	martin.petersen, brajeswar.linux
  Cc: MPT-FusionLinux.pdl, linux-scsi, linux-kernel

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>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 59d7844..d7ef671 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -4516,7 +4516,7 @@ void mpt3sas_base_clear_st(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) {
@@ -4525,7 +4525,6 @@ void mpt3sas_base_clear_st(struct MPT3SAS_ADAPTER *ioc,
 			ioc->name);
 			goto out;
 		}
-		memset(ioc->reply_post[i].reply_post_free, 0, sz);
 		dinitprintk(ioc, pr_info(MPT3SAS_FMT
 		    "reply post free pool (0x%p): depth(%d),"
 		    "element_size(%d), pool_size(%d kB)\n", ioc->name,
@@ -4852,14 +4851,13 @@ void mpt3sas_base_clear_st(struct MPT3SAS_ADAPTER *ioc,
 			ioc->name);
 		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) {
 		pr_err(MPT3SAS_FMT "reply_free pool: dma_pool_alloc failed\n",
 			ioc->name);
 		goto out;
 	}
-	memset(ioc->reply_free, 0, sz);
 	dinitprintk(ioc, pr_info(MPT3SAS_FMT "reply_free pool(0x%p): " \
 	    "depth(%d), element_size(%d), pool_size(%d kB)\n", ioc->name,
 	    ioc->reply_free, ioc->reply_free_queue_depth, 4, sz/1024));
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi/mpt3sas: Use dma_pool_zalloc
  2018-10-02  5:48 [PATCH] scsi/mpt3sas: Use dma_pool_zalloc Souptick Joarder
@ 2018-10-08 16:28 ` Souptick Joarder
  2018-10-09  6:02 ` Suganath Prabu Subramani
  2018-10-11  2:05 ` Martin K. Petersen
  2 siblings, 0 replies; 5+ messages in thread
From: Souptick Joarder @ 2018-10-08 16:28 UTC (permalink / raw)
  To: sathya.prakash, chaitra.basappa, suganath-prabu.subramani,
	James Bottomley, Martin K. Petersen, Brajeswar Ghosh
  Cc: MPT-FusionLinux.pdl, linux-scsi, linux-kernel

On Tue, Oct 2, 2018 at 11:14 AM Souptick Joarder <jrdr.linux@gmail.com> wrote:
>
> 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>

Any comment on this patch ?
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
> index 59d7844..d7ef671 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> @@ -4516,7 +4516,7 @@ void mpt3sas_base_clear_st(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) {
> @@ -4525,7 +4525,6 @@ void mpt3sas_base_clear_st(struct MPT3SAS_ADAPTER *ioc,
>                         ioc->name);
>                         goto out;
>                 }
> -               memset(ioc->reply_post[i].reply_post_free, 0, sz);
>                 dinitprintk(ioc, pr_info(MPT3SAS_FMT
>                     "reply post free pool (0x%p): depth(%d),"
>                     "element_size(%d), pool_size(%d kB)\n", ioc->name,
> @@ -4852,14 +4851,13 @@ void mpt3sas_base_clear_st(struct MPT3SAS_ADAPTER *ioc,
>                         ioc->name);
>                 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) {
>                 pr_err(MPT3SAS_FMT "reply_free pool: dma_pool_alloc failed\n",
>                         ioc->name);
>                 goto out;
>         }
> -       memset(ioc->reply_free, 0, sz);
>         dinitprintk(ioc, pr_info(MPT3SAS_FMT "reply_free pool(0x%p): " \
>             "depth(%d), element_size(%d), pool_size(%d kB)\n", ioc->name,
>             ioc->reply_free, ioc->reply_free_queue_depth, 4, sz/1024));
> --
> 1.9.1
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi/mpt3sas: Use dma_pool_zalloc
  2018-10-02  5:48 [PATCH] scsi/mpt3sas: Use dma_pool_zalloc Souptick Joarder
  2018-10-08 16:28 ` Souptick Joarder
@ 2018-10-09  6:02 ` Suganath Prabu Subramani
  2018-10-11  2:06   ` Martin K. Petersen
  2018-10-11  2:05 ` Martin K. Petersen
  2 siblings, 1 reply; 5+ messages in thread
From: Suganath Prabu Subramani @ 2018-10-09  6:02 UTC (permalink / raw)
  To: jrdr.linux
  Cc: Sathya Prakash, Chaitra Basappa, jejb, Martin K. Petersen,
	brajeswar.linux, PDL-MPT-FUSIONLINUX, linux-scsi, linux-kernel

Looks good,
Please consider this patch as Acked-by: Suganath Prabu
<suganath-prabu.subramani@broadcom.com>

Thanks

On Tue, Oct 2, 2018 at 11:14 AM Souptick Joarder <jrdr.linux@gmail.com> wrote:
>
> 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>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
> index 59d7844..d7ef671 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> @@ -4516,7 +4516,7 @@ void mpt3sas_base_clear_st(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) {
> @@ -4525,7 +4525,6 @@ void mpt3sas_base_clear_st(struct MPT3SAS_ADAPTER *ioc,
>                         ioc->name);
>                         goto out;
>                 }
> -               memset(ioc->reply_post[i].reply_post_free, 0, sz);
>                 dinitprintk(ioc, pr_info(MPT3SAS_FMT
>                     "reply post free pool (0x%p): depth(%d),"
>                     "element_size(%d), pool_size(%d kB)\n", ioc->name,
> @@ -4852,14 +4851,13 @@ void mpt3sas_base_clear_st(struct MPT3SAS_ADAPTER *ioc,
>                         ioc->name);
>                 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) {
>                 pr_err(MPT3SAS_FMT "reply_free pool: dma_pool_alloc failed\n",
>                         ioc->name);
>                 goto out;
>         }
> -       memset(ioc->reply_free, 0, sz);
>         dinitprintk(ioc, pr_info(MPT3SAS_FMT "reply_free pool(0x%p): " \
>             "depth(%d), element_size(%d), pool_size(%d kB)\n", ioc->name,
>             ioc->reply_free, ioc->reply_free_queue_depth, 4, sz/1024));
> --
> 1.9.1
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi/mpt3sas: Use dma_pool_zalloc
  2018-10-02  5:48 [PATCH] scsi/mpt3sas: Use dma_pool_zalloc Souptick Joarder
  2018-10-08 16:28 ` Souptick Joarder
  2018-10-09  6:02 ` Suganath Prabu Subramani
@ 2018-10-11  2:05 ` Martin K. Petersen
  2 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2018-10-11  2:05 UTC (permalink / raw)
  To: Souptick Joarder
  Cc: sathya.prakash, chaitra.basappa, suganath-prabu.subramani, jejb,
	martin.petersen, brajeswar.linux, MPT-FusionLinux.pdl,
	linux-scsi, linux-kernel


Souptick,

> Replaced dma_pool_alloc + memset with dma_pool_zalloc.

Applied to 4.20/scsi-queue, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scsi/mpt3sas: Use dma_pool_zalloc
  2018-10-09  6:02 ` Suganath Prabu Subramani
@ 2018-10-11  2:06   ` Martin K. Petersen
  0 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2018-10-11  2:06 UTC (permalink / raw)
  To: Suganath Prabu Subramani
  Cc: jrdr.linux, Sathya Prakash, Chaitra Basappa, jejb,
	Martin K. Petersen, brajeswar.linux, PDL-MPT-FUSIONLINUX,
	linux-scsi, linux-kernel


Suganath,

> Please consider this patch as Acked-by: Suganath Prabu
> <suganath-prabu.subramani@broadcom.com>

Next time, please make sure to put

Acked-by: Suganath Prabu <suganath-prabu.subramani@broadcom.com>

on a line by itself. Otherwise patchwork won't pick up the tag.

Thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-10-11  2:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-02  5:48 [PATCH] scsi/mpt3sas: Use dma_pool_zalloc Souptick Joarder
2018-10-08 16:28 ` Souptick Joarder
2018-10-09  6:02 ` Suganath Prabu Subramani
2018-10-11  2:06   ` Martin K. Petersen
2018-10-11  2:05 ` Martin K. Petersen

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).