This line extracted the available queue space without properly shifting it. Since the code only cared wether it was zero or not, it worked as expected without the shift, but adding shift makes the code cleaner. While we're here, store the result in a helper variable that was already declared to increase readability a bit more. Signed-off-by: Matthijs Kooijman <matthijs@xxxxxxxx> Acked-by: Paul Zimmerman <paulz@xxxxxxxxxxxx> --- drivers/staging/dwc2/hcd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/dwc2/hcd.c b/drivers/staging/dwc2/hcd.c index f11b4f0..9a1e062 100644 --- a/drivers/staging/dwc2/hcd.c +++ b/drivers/staging/dwc2/hcd.c @@ -1020,7 +1020,9 @@ static void dwc2_process_periodic_channels(struct dwc2_hsotg *hsotg) qh_ptr = hsotg->periodic_sched_assigned.next; while (qh_ptr != &hsotg->periodic_sched_assigned) { tx_status = readl(hsotg->regs + HPTXSTS); - if ((tx_status & TXSTS_QSPCAVAIL_MASK) == 0) { + qspcavail = (tx_status & TXSTS_QSPCAVAIL_MASK) >> + TXSTS_QSPCAVAIL_SHIFT; + if (qspcavail == 0) { no_queue_space = 1; break; } -- 1.8.4.rc1 -- 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