* [PATCH] scsi/aic94xx/aic94xx_hwi.c: Use dma_pool_zalloc
@ 2018-11-01 4:19 Souptick Joarder
2018-11-01 20:55 ` Kees Cook
2018-11-22 3:06 ` Martin K. Petersen
0 siblings, 2 replies; 4+ messages in thread
From: Souptick Joarder @ 2018-11-01 4:19 UTC (permalink / raw)
To: jejb, martin.petersen, keescook
Cc: linux-scsi, linux-kernel, brajeswar.linux, sabyasachi.linux
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/aic94xx/aic94xx_hwi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/aic94xx/aic94xx_hwi.c b/drivers/scsi/aic94xx/aic94xx_hwi.c
index 3b8ad55e59de..2bc7615193bd 100644
--- a/drivers/scsi/aic94xx/aic94xx_hwi.c
+++ b/drivers/scsi/aic94xx/aic94xx_hwi.c
@@ -1057,14 +1057,13 @@ static struct asd_ascb *asd_ascb_alloc(struct asd_ha_struct *asd_ha,
if (ascb) {
ascb->dma_scb.size = sizeof(struct scb);
- ascb->dma_scb.vaddr = dma_pool_alloc(asd_ha->scb_pool,
+ ascb->dma_scb.vaddr = dma_pool_zalloc(asd_ha->scb_pool,
gfp_flags,
&ascb->dma_scb.dma_handle);
if (!ascb->dma_scb.vaddr) {
kmem_cache_free(asd_ascb_cache, ascb);
return NULL;
}
- memset(ascb->dma_scb.vaddr, 0, sizeof(struct scb));
asd_init_ascb(asd_ha, ascb);
spin_lock_irqsave(&seq->tc_index_lock, flags);
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi/aic94xx/aic94xx_hwi.c: Use dma_pool_zalloc
2018-11-01 4:19 [PATCH] scsi/aic94xx/aic94xx_hwi.c: Use dma_pool_zalloc Souptick Joarder
@ 2018-11-01 20:55 ` Kees Cook
2018-11-02 5:54 ` Souptick Joarder
2018-11-22 3:06 ` Martin K. Petersen
1 sibling, 1 reply; 4+ messages in thread
From: Kees Cook @ 2018-11-01 20:55 UTC (permalink / raw)
To: Souptick Joarder
Cc: James E.J. Bottomley, Martin K. Petersen, linux-scsi, LKML,
brajeswar.linux, sabyasachi.linux
On Wed, Oct 31, 2018 at 9:19 PM, 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>
Reviewed-by: Kees Cook <keescook@chromium.org>
-Kees
> ---
> drivers/scsi/aic94xx/aic94xx_hwi.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/aic94xx/aic94xx_hwi.c b/drivers/scsi/aic94xx/aic94xx_hwi.c
> index 3b8ad55e59de..2bc7615193bd 100644
> --- a/drivers/scsi/aic94xx/aic94xx_hwi.c
> +++ b/drivers/scsi/aic94xx/aic94xx_hwi.c
> @@ -1057,14 +1057,13 @@ static struct asd_ascb *asd_ascb_alloc(struct asd_ha_struct *asd_ha,
>
> if (ascb) {
> ascb->dma_scb.size = sizeof(struct scb);
> - ascb->dma_scb.vaddr = dma_pool_alloc(asd_ha->scb_pool,
> + ascb->dma_scb.vaddr = dma_pool_zalloc(asd_ha->scb_pool,
> gfp_flags,
> &ascb->dma_scb.dma_handle);
> if (!ascb->dma_scb.vaddr) {
> kmem_cache_free(asd_ascb_cache, ascb);
> return NULL;
> }
> - memset(ascb->dma_scb.vaddr, 0, sizeof(struct scb));
> asd_init_ascb(asd_ha, ascb);
>
> spin_lock_irqsave(&seq->tc_index_lock, flags);
> --
> 2.17.1
>
--
Kees Cook
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi/aic94xx/aic94xx_hwi.c: Use dma_pool_zalloc
2018-11-01 20:55 ` Kees Cook
@ 2018-11-02 5:54 ` Souptick Joarder
0 siblings, 0 replies; 4+ messages in thread
From: Souptick Joarder @ 2018-11-02 5:54 UTC (permalink / raw)
To: Kees Cook
Cc: James Bottomley, Martin K. Petersen, linux-scsi, linux-kernel,
Brajeswar Ghosh, Sabyasachi Gupta
On Fri, Nov 2, 2018 at 2:25 AM Kees Cook <keescook@chromium.org> wrote:
>
> On Wed, Oct 31, 2018 at 9:19 PM, 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>
>
> Reviewed-by: Kees Cook <keescook@chromium.org>
Thanks Kees.
>
> -Kees
>
> > ---
> > drivers/scsi/aic94xx/aic94xx_hwi.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/scsi/aic94xx/aic94xx_hwi.c b/drivers/scsi/aic94xx/aic94xx_hwi.c
> > index 3b8ad55e59de..2bc7615193bd 100644
> > --- a/drivers/scsi/aic94xx/aic94xx_hwi.c
> > +++ b/drivers/scsi/aic94xx/aic94xx_hwi.c
> > @@ -1057,14 +1057,13 @@ static struct asd_ascb *asd_ascb_alloc(struct asd_ha_struct *asd_ha,
> >
> > if (ascb) {
> > ascb->dma_scb.size = sizeof(struct scb);
> > - ascb->dma_scb.vaddr = dma_pool_alloc(asd_ha->scb_pool,
> > + ascb->dma_scb.vaddr = dma_pool_zalloc(asd_ha->scb_pool,
> > gfp_flags,
> > &ascb->dma_scb.dma_handle);
> > if (!ascb->dma_scb.vaddr) {
> > kmem_cache_free(asd_ascb_cache, ascb);
> > return NULL;
> > }
> > - memset(ascb->dma_scb.vaddr, 0, sizeof(struct scb));
> > asd_init_ascb(asd_ha, ascb);
> >
> > spin_lock_irqsave(&seq->tc_index_lock, flags);
> > --
> > 2.17.1
> >
>
>
>
> --
> Kees Cook
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi/aic94xx/aic94xx_hwi.c: Use dma_pool_zalloc
2018-11-01 4:19 [PATCH] scsi/aic94xx/aic94xx_hwi.c: Use dma_pool_zalloc Souptick Joarder
2018-11-01 20:55 ` Kees Cook
@ 2018-11-22 3:06 ` Martin K. Petersen
1 sibling, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2018-11-22 3:06 UTC (permalink / raw)
To: Souptick Joarder
Cc: jejb, martin.petersen, keescook, linux-scsi, linux-kernel,
brajeswar.linux, sabyasachi.linux
Souptick,
> Replaced dma_pool_alloc + memset with dma_pool_zalloc
Applied to 4.21/scsi-queue, thanks.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-11-22 3:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-01 4:19 [PATCH] scsi/aic94xx/aic94xx_hwi.c: Use dma_pool_zalloc Souptick Joarder
2018-11-01 20:55 ` Kees Cook
2018-11-02 5:54 ` Souptick Joarder
2018-11-22 3:06 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.