Commit a9383a6c authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Felipe Balbi

usb: gadget: udc: Remove unnecessary parentheses

Clang warns when multiple pairs of parentheses are used for a single
conditional statement.

drivers/usb/gadget/udc/mv_udc_core.c:188:33: warning: equality
comparison with extraneous parentheses [-Wparentheses-equality]
        while ((curr_dqh->curr_dtd_ptr == curr_dtd->td_dma)) {
                ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
drivers/usb/gadget/udc/mv_udc_core.c:188:33: note: remove extraneous
parentheses around the comparison to silence this warning
        while ((curr_dqh->curr_dtd_ptr == curr_dtd->td_dma)) {
               ~                       ^                  ~
drivers/usb/gadget/udc/mv_udc_core.c:188:33: note: use '=' to turn this
equality comparison into an assignment
        while ((curr_dqh->curr_dtd_ptr == curr_dtd->td_dma)) {
                                       ^~
                                       =
1 warning generated.

Link: https://github.com/ClangBuiltLinux/linux/issues/120Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 971a0d4e
......@@ -185,7 +185,7 @@ static int process_ep_req(struct mv_udc *udc, int index,
else
bit_pos = 1 << (16 + curr_req->ep->ep_num);
while ((curr_dqh->curr_dtd_ptr == curr_dtd->td_dma)) {
while (curr_dqh->curr_dtd_ptr == curr_dtd->td_dma) {
if (curr_dtd->dtd_next == EP_QUEUE_HEAD_NEXT_TERMINATE) {
while (readl(&udc->op_regs->epstatus) & bit_pos)
udelay(1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment