mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Himanshu Jha <himanshujha199640@gmail.com>
To: "Luis R. Rodriguez" <mcgrof@kernel.org>
Cc: 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, Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [PATCH] scsi: Use vzalloc instead of vmalloc/memset
Date: Wed, 8 Nov 2017 02:30:46 +0530	[thread overview]
Message-ID: <20171107210046.GA3948@himanshu-Vostro-3559> (raw)
In-Reply-To: <20171107195136.GD22894@wotan.suse.de>

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.
> 
> 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 21:00 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 [this message]
2017-11-07 23:43     ` Julia Lawall

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=20171107210046.GA3948@himanshu-Vostro-3559 \
    --to=himanshujha199640@gmail.com \
    --cc=anil.gurumurthy@qlogic.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=julia.lawall@lip6.fr \
    --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®