lkml.org 
[lkml]   [2014]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH -next 24/26] usb: Use dma_zalloc_coherent
Date
> From: Joe Perches [mailto:joe@perches.com]
> Sent: Sunday, June 15, 2014 1:38 PM
>
> Use the zeroing function instead of dma_alloc_coherent & memset(,0,)
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/usb/dwc2/hcd_ddma.c | 20 +++++++-------------
> drivers/usb/host/uhci-hcd.c | 7 +++----
> 2 files changed, 10 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/usb/dwc2/hcd_ddma.c b/drivers/usb/dwc2/hcd_ddma.c
> index 3376177..ab8d7fc 100644
> --- a/drivers/usb/dwc2/hcd_ddma.c
> +++ b/drivers/usb/dwc2/hcd_ddma.c
> @@ -87,17 +87,12 @@ static u16 dwc2_frame_incr_val(struct dwc2_qh *qh)
> static int dwc2_desc_list_alloc(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh,
> gfp_t flags)
> {
> - qh->desc_list = dma_alloc_coherent(hsotg->dev,
> - sizeof(struct dwc2_hcd_dma_desc) *
> - dwc2_max_desc_num(qh), &qh->desc_list_dma,
> - flags);
> -
> + qh->desc_list = dma_zalloc_coherent(hsotg->dev,
> + sizeof(struct dwc2_hcd_dma_desc) * dwc2_max_desc_num(qh),
> + &qh->desc_list_dma, flags);

This will cause checkpatch to complain about a too-long line, surely?
If you fix that, you can add my acked-by for the dwc2 parts.

--
Paul



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