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: <1402875148.2750.3.camel@joe-AO725>
Date:	Sun, 15 Jun 2014 16:32:28 -0700
From:	Joe Perches <joe@...ches.com>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	linux-kernel@...r.kernel.org, Paul Zimmerman <paulz@...opsys.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-usb@...r.kernel.org
Subject: Re: [PATCH -next 24/26] usb: Use dma_zalloc_coherent

On Sun, 2014-06-15 at 18:02 -0400, Alan Stern wrote:
> On Sun, 15 Jun 2014, Joe Perches wrote:
> 
> > Use the zeroing function instead of dma_alloc_coherent & memset(,0,)
> > 
> > Signed-off-by: Joe Perches <joe@...ches.com>
> 
> ...
> 
> > diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
> > index 27f35e8..681fc5e 100644
> > --- a/drivers/usb/host/uhci-hcd.c
> > +++ b/drivers/usb/host/uhci-hcd.c
> > @@ -589,15 +589,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, 0);
> > +	uhci->frame = dma_zalloc_coherent(uhci_dev(uhci),
> > +					  UHCI_NUMFRAMES * sizeof(*uhci->frame),
> > +					  &uhci->frame_dma_handle, 0);
> 
> Please don't change the coding style.  This file indents continuation  
> lines by two tab stops; it doesn't align things with opening parens.

Convert it to style of your choice.

Anyway, there are a lot of instances of alignment to parens
in drivers/usb/ than not.

Also, that last argument 0 should be GFP_KERNEL


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ