RE: [PATCH -next 24/26] usb: Use dma_zalloc_coherent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Joe Perches [mailto:joe@xxxxxxxxxxx]
> 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@xxxxxxxxxxx>
> ---
>  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

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux