lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171230182559.GA8593@himanshu-Vostro-3559>
Date:   Sat, 30 Dec 2017 23:55:59 +0530
From:   Himanshu Jha <himanshujha199640@...il.com>
To:     Alan Stern <stern@...land.harvard.edu>
Cc:     gregkh@...uxfoundation.org, mathias.nyman@...el.com,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        mcgrof@...nel.org
Subject: Re: [PATCH] USB: host: Use zeroing memory allocator rather than
 allocator/memset

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@...nel.org>
> > Signed-off-by: Himanshu Jha <himanshujha199640@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ