lkml.org 
[lkml]   [2014]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -next 24/26] usb: Use dma_zalloc_coherent
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@perches.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.

Alan Stern



\
 
 \ /
  Last update: 2014-06-16 00:21    [W:0.363 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site