mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
staging: dwc2: remove some indent levels
Instead of writing code like: if (dwc2_qh_is_non_per(qh)) { ... } else { ... } return; write it like: if (dwc2_qh_is_non_per(qh)) { ... return; } ... Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d31e6ca405
commit
5e1284758a
1 changed files with 51 additions and 48 deletions
|
@ -594,7 +594,9 @@ int dwc2_hcd_qh_add(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh)
|
||||||
/* Always start in inactive schedule */
|
/* Always start in inactive schedule */
|
||||||
list_add_tail(&qh->qh_list_entry,
|
list_add_tail(&qh->qh_list_entry,
|
||||||
&hsotg->non_periodic_sched_inactive);
|
&hsotg->non_periodic_sched_inactive);
|
||||||
} else {
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
status = dwc2_schedule_periodic(hsotg, qh);
|
status = dwc2_schedule_periodic(hsotg, qh);
|
||||||
if (status)
|
if (status)
|
||||||
return status;
|
return status;
|
||||||
|
@ -604,7 +606,6 @@ int dwc2_hcd_qh_add(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh)
|
||||||
writel(intr_mask, hsotg->regs + GINTMSK);
|
writel(intr_mask, hsotg->regs + GINTMSK);
|
||||||
}
|
}
|
||||||
hsotg->periodic_qh_count++;
|
hsotg->periodic_qh_count++;
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -631,7 +632,9 @@ void dwc2_hcd_qh_unlink(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh)
|
||||||
hsotg->non_periodic_qh_ptr =
|
hsotg->non_periodic_qh_ptr =
|
||||||
hsotg->non_periodic_qh_ptr->next;
|
hsotg->non_periodic_qh_ptr->next;
|
||||||
list_del_init(&qh->qh_list_entry);
|
list_del_init(&qh->qh_list_entry);
|
||||||
} else {
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
dwc2_deschedule_periodic(hsotg, qh);
|
dwc2_deschedule_periodic(hsotg, qh);
|
||||||
hsotg->periodic_qh_count--;
|
hsotg->periodic_qh_count--;
|
||||||
if (!hsotg->periodic_qh_count) {
|
if (!hsotg->periodic_qh_count) {
|
||||||
|
@ -639,7 +642,6 @@ void dwc2_hcd_qh_unlink(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh)
|
||||||
intr_mask &= ~GINTSTS_SOF;
|
intr_mask &= ~GINTSTS_SOF;
|
||||||
writel(intr_mask, hsotg->regs + GINTMSK);
|
writel(intr_mask, hsotg->regs + GINTMSK);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -693,6 +695,8 @@ static void dwc2_sched_periodic_split(struct dwc2_hsotg *hsotg,
|
||||||
void dwc2_hcd_qh_deactivate(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh,
|
void dwc2_hcd_qh_deactivate(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh,
|
||||||
int sched_next_periodic_split)
|
int sched_next_periodic_split)
|
||||||
{
|
{
|
||||||
|
u16 frame_number;
|
||||||
|
|
||||||
if (dbg_qh(qh))
|
if (dbg_qh(qh))
|
||||||
dev_vdbg(hsotg->dev, "%s()\n", __func__);
|
dev_vdbg(hsotg->dev, "%s()\n", __func__);
|
||||||
|
|
||||||
|
@ -701,8 +705,10 @@ void dwc2_hcd_qh_deactivate(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh,
|
||||||
if (!list_empty(&qh->qtd_list))
|
if (!list_empty(&qh->qtd_list))
|
||||||
/* Add back to inactive non-periodic schedule */
|
/* Add back to inactive non-periodic schedule */
|
||||||
dwc2_hcd_qh_add(hsotg, qh);
|
dwc2_hcd_qh_add(hsotg, qh);
|
||||||
} else {
|
return;
|
||||||
u16 frame_number = dwc2_hcd_get_frame_number(hsotg);
|
}
|
||||||
|
|
||||||
|
frame_number = dwc2_hcd_get_frame_number(hsotg);
|
||||||
|
|
||||||
if (qh->do_split) {
|
if (qh->do_split) {
|
||||||
dwc2_sched_periodic_split(hsotg, qh, frame_number,
|
dwc2_sched_periodic_split(hsotg, qh, frame_number,
|
||||||
|
@ -716,22 +722,19 @@ void dwc2_hcd_qh_deactivate(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh,
|
||||||
|
|
||||||
if (list_empty(&qh->qtd_list)) {
|
if (list_empty(&qh->qtd_list)) {
|
||||||
dwc2_hcd_qh_unlink(hsotg, qh);
|
dwc2_hcd_qh_unlink(hsotg, qh);
|
||||||
} else {
|
return;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* Remove from periodic_sched_queued and move to
|
* Remove from periodic_sched_queued and move to
|
||||||
* appropriate queue
|
* appropriate queue
|
||||||
*/
|
*/
|
||||||
if ((hsotg->core_params->uframe_sched > 0 &&
|
if ((hsotg->core_params->uframe_sched > 0 &&
|
||||||
dwc2_frame_num_le(qh->sched_frame, frame_number))
|
dwc2_frame_num_le(qh->sched_frame, frame_number)) ||
|
||||||
|| (hsotg->core_params->uframe_sched <= 0 &&
|
(hsotg->core_params->uframe_sched <= 0 &&
|
||||||
qh->sched_frame == frame_number))
|
qh->sched_frame == frame_number))
|
||||||
list_move(&qh->qh_list_entry,
|
list_move(&qh->qh_list_entry, &hsotg->periodic_sched_ready);
|
||||||
&hsotg->periodic_sched_ready);
|
|
||||||
else
|
else
|
||||||
list_move(&qh->qh_list_entry,
|
list_move(&qh->qh_list_entry, &hsotg->periodic_sched_inactive);
|
||||||
&hsotg->periodic_sched_inactive);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue