mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Himanshu Jha <himanshujha199640@gmail.com>
Cc: "Luis R. Rodriguez" <mcgrof@kernel.org>,
	anil.gurumurthy@qlogic.com, sudarsana.kalluru@qlogic.com,
	jejb@linux.vnet.ibm.com, martin.petersen@oracle.com,
	qla2xxx-upstream@qlogic.com, kartilak@cisco.com,
	sebaddel@cisco.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: Use vzalloc instead of vmalloc/memset
Date: Wed, 8 Nov 2017 07:43:14 +0800 (CST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1711080741261.1984@hadrien> (raw)
In-Reply-To: <20171107210046.GA3948@himanshu-Vostro-3559>



On Wed, 8 Nov 2017, Himanshu Jha wrote:

> On Tue, Nov 07, 2017 at 08:51:36PM +0100, Luis R. Rodriguez wrote:
> > On Sun, Nov 05, 2017 at 03:26:26AM +0530, Himanshu Jha wrote:
> > > Use vzalloc instead of vmalloc/memset to allocate memory filled with 0
> > > value.
> > >
> > > Done using Coccinelle.
> > > Semantic patch used :
> > >
> > > @@
> > > expression x,a;
> > > statement S;
> > > @@
> > >
> > > - x = vmalloc(a);
> > > + x = vzalloc(a);
> > >   if (x == NULL || ...) S
> > > - memset(x, 0, a);
> >
> > How many false positives do you get? Have you identified any?
> > If not you should consider adding this SmPL rule to:
> >
> > scripts/coccinelle/api/
> >
> > Some maintainers may ask you for the SmPL rule to be upstream first,
> > not all though. So its good practice for you to strive for this.
> > Another reason for it to go upstream is then other maintainers
> > can / should be running coccicheck against their subsystem to avoid
> > stupid regressions.
> >
> > You may want to explain for patches like these that they have been
> > tested by 0-day without any issues found.
> >
> > Also add the tag:
> >
> > Generated-by: Coccinelle SmPL
> >
> > > Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
> > > ---
> > >  drivers/scsi/bfa/bfad.c            | 3 +--
> > >  drivers/scsi/bfa/bfad_debugfs.c    | 8 ++------
> > >  drivers/scsi/qla2xxx/qla_bsg.c     | 3 +--
> > >  drivers/scsi/qla2xxx/tcm_qla2xxx.c | 5 +----
> > >  drivers/scsi/scsi_debug.c          | 6 ++----
> > >  drivers/scsi/snic/snic_trc.c       | 3 +--
> > >  6 files changed, 8 insertions(+), 20 deletions(-)
> >
> > Split this up per driver, and resend by using ./scripts/get_maintainer.pl
> > foo.patch and ensuring the right folks get the email.  Right now you
> > just spammed tons of people and the changes may be preferred to go
> > upstream atomically per driver, always assume this first.

Depending on the subsystem, you may get similar pushback if you send one
patch per file - "why send so many patches for such a small change when
they are all going through my tree".  So consider grouping the patches by
set of maintainers.

julia

> >
> > Other than this, feel free to add to each of the patches you created:
> >
>
> Thanks for the feeedback! I will resend the patch with the necessary
> changes.
>
> > Acked-by: Luis R. Rodriguez <mcgrof@kernel.org>
>
>
> Thanks
> Himanshu Jha
>

      reply	other threads:[~2017-11-07 23:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-04 21:56 Himanshu Jha
2017-11-07 19:51 ` Luis R. Rodriguez
2017-11-07 21:00   ` Himanshu Jha
2017-11-07 23:43     ` Julia Lawall [this message]

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=alpine.DEB.2.20.1711080741261.1984@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=anil.gurumurthy@qlogic.com \
    --cc=himanshujha199640@gmail.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=kartilak@cisco.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mcgrof@kernel.org \
    --cc=qla2xxx-upstream@qlogic.com \
    --cc=sebaddel@cisco.com \
    --cc=sudarsana.kalluru@qlogic.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

all inboxes | Powered by JetHome®