From: Souptick Joarder <jrdr.linux@gmail.com>
To: Kees Cook <keescook@chromium.org>
Cc: James Bottomley <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi <linux-scsi@vger.kernel.org>,
linux-kernel@vger.kernel.org,
Brajeswar Ghosh <brajeswar.linux@gmail.com>,
Sabyasachi Gupta <sabyasachi.linux@gmail.com>
Subject: Re: [PATCH] scsi/aic94xx/aic94xx_hwi.c: Use dma_pool_zalloc
Date: Fri, 2 Nov 2018 11:24:03 +0530 [thread overview]
Message-ID: <CAFqt6zbfizXX8myKgE_5k6X2gDrQGJmhWJDubgqiTL2r62gb_Q@mail.gmail.com> (raw)
In-Reply-To: <CAGXu5jLYaT7LtUS+t98GjMjjzz2kbs6JZ_WJRYnWo7iZ9nOFKQ@mail.gmail.com>
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
next prev parent reply other threads:[~2018-11-02 5:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2018-11-22 3:06 ` Martin K. Petersen
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=CAFqt6zbfizXX8myKgE_5k6X2gDrQGJmhWJDubgqiTL2r62gb_Q@mail.gmail.com \
--to=jrdr.linux@gmail.com \
--cc=brajeswar.linux@gmail.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=sabyasachi.linux@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).