mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Himanshu Jha <himanshujha199640@gmail.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: gregkh@linuxfoundation.org, mathias.nyman@intel.com,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	mcgrof@kernel.org
Subject: Re: [PATCH] USB: host: Use zeroing memory allocator rather than allocator/memset
Date: Sat, 30 Dec 2017 23:55:59 +0530	[thread overview]
Message-ID: <20171230182559.GA8593@himanshu-Vostro-3559> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1712301140420.18834-100000@netrider.rowland.org>

On Sat, Dec 30, 2017 at 11:41:19AM -0500, Alan Stern wrote:
> On Sat, 30 Dec 2017, Himanshu Jha wrote:
> 
> > Use dma_zalloc_coherent for allocating zeroed
> > memory and remove unnecessary memset function.
> > 
> > Done using Coccinelle.
> > Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci
> > 0-day tested with no failures.
> > 
> > Suggested-by: Luis R. Rodriguez <mcgrof@kernel.org>
> > Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
> > ---
> >  drivers/usb/host/uhci-hcd.c | 7 +++----
> >  drivers/usb/host/xhci-mem.c | 7 ++-----
> >  2 files changed, 5 insertions(+), 9 deletions(-)
> > 
> > diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
> > index f5c9021..ac53398 100644
> > --- a/drivers/usb/host/uhci-hcd.c
> > +++ b/drivers/usb/host/uhci-hcd.c
> > @@ -600,15 +600,14 @@ static int uhci_start(struct usb_hcd *hcd)
> >  	uhci->dentry = dentry;
> >  #endif
> >  
> > -	uhci->frame = dma_alloc_coherent(uhci_dev(uhci),
> > -			UHCI_NUMFRAMES * sizeof(*uhci->frame),
> > -			&uhci->frame_dma_handle, GFP_KERNEL);
> > +	uhci->frame = dma_zalloc_coherent(uhci_dev(uhci),
> > +					  UHCI_NUMFRAMES * sizeof(*uhci->frame),
> > +					  &uhci->frame_dma_handle, GFP_KERNEL);
> 
> Please don't change the existing whitespace scheme when you make 
> changes like this one.

Thanks for the feedback!
Do I need to send v2 for this ?

Thanks
Himanshu Jha

  reply	other threads:[~2017-12-30 18:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-30 15:42 Himanshu Jha
2017-12-30 16:41 ` Alan Stern
2017-12-30 18:25   ` Himanshu Jha [this message]
2017-12-30 19:26     ` Alan Stern

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=20171230182559.GA8593@himanshu-Vostro-3559 \
    --to=himanshujha199640@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=mcgrof@kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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®