usb: dwc2: Cleanup some checkpatch issues
This commmit is the result of running checkpatch --fix. The results were verified for correctness. Some of the fixes result in line over 80 char which we will fix manually later. The following is a summary of what was done by checkpatch: * Remove externs on function prototypes. * Replace symbolic permissions with octal. * Align code to open parens. * Replace 'unsigned' with 'unsigned int'. * Remove unneccessary blank lines. * Add blank lines after declarations. * Add spaces around operators. * Remove unnecessary spaces after casts. * Replace 'x == NULL' with '!x'. * Replace kzalloc() with kcalloc(). * Concatenate multi-line strings. * Use the BIT() macro. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
@@ -106,7 +106,7 @@ static int dwc2_desc_list_alloc(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh,
|
||||
qh->desc_list_sz,
|
||||
DMA_TO_DEVICE);
|
||||
|
||||
qh->n_bytes = kzalloc(sizeof(u32) * dwc2_max_desc_num(qh), flags);
|
||||
qh->n_bytes = kcalloc(dwc2_max_desc_num(qh), sizeof(u32), flags);
|
||||
if (!qh->n_bytes) {
|
||||
dma_unmap_single(hsotg->dev, qh->desc_list_dma,
|
||||
qh->desc_list_sz,
|
||||
@@ -175,7 +175,6 @@ static void dwc2_frame_list_free(struct dwc2_hsotg *hsotg)
|
||||
hsotg->frame_list = NULL;
|
||||
|
||||
spin_unlock_irqrestore(&hsotg->lock, flags);
|
||||
|
||||
}
|
||||
|
||||
static void dwc2_per_sched_enable(struct dwc2_hsotg *hsotg, u32 fr_list_en)
|
||||
@@ -570,7 +569,7 @@ static void dwc2_fill_host_isoc_dma_desc(struct dwc2_hsotg *hsotg,
|
||||
#endif
|
||||
|
||||
dma_sync_single_for_device(hsotg->dev,
|
||||
qh->desc_list_dma +
|
||||
qh->desc_list_dma +
|
||||
(idx * sizeof(struct dwc2_dma_desc)),
|
||||
sizeof(struct dwc2_dma_desc),
|
||||
DMA_TO_DEVICE);
|
||||
@@ -776,7 +775,7 @@ static void dwc2_init_non_isoc_dma_desc(struct dwc2_hsotg *hsotg,
|
||||
n_desc - 1,
|
||||
&qh->desc_list[n_desc - 1]);
|
||||
dma_sync_single_for_device(hsotg->dev,
|
||||
qh->desc_list_dma +
|
||||
qh->desc_list_dma +
|
||||
((n_desc - 1) *
|
||||
sizeof(struct dwc2_dma_desc)),
|
||||
sizeof(struct dwc2_dma_desc),
|
||||
@@ -816,7 +815,7 @@ static void dwc2_init_non_isoc_dma_desc(struct dwc2_hsotg *hsotg,
|
||||
dev_vdbg(hsotg->dev, "set A bit in desc 0 (%p)\n",
|
||||
&qh->desc_list[0]);
|
||||
dma_sync_single_for_device(hsotg->dev,
|
||||
qh->desc_list_dma,
|
||||
qh->desc_list_dma,
|
||||
sizeof(struct dwc2_dma_desc),
|
||||
DMA_TO_DEVICE);
|
||||
}
|
||||
@@ -1064,7 +1063,7 @@ stop_scan:
|
||||
}
|
||||
|
||||
static int dwc2_update_non_isoc_urb_state_ddma(struct dwc2_hsotg *hsotg,
|
||||
struct dwc2_host_chan *chan,
|
||||
struct dwc2_host_chan *chan,
|
||||
struct dwc2_qtd *qtd,
|
||||
struct dwc2_dma_desc *dma_desc,
|
||||
enum dwc2_halt_status halt_status,
|
||||
|
Reference in New Issue
Block a user