Skip to content

Commit a9383a6

Browse files
nathanchanceFelipe Balbi
authored andcommitted
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: ClangBuiltLinux#120 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
1 parent 971a0d4 commit a9383a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/gadget/udc/mv_udc_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ static int process_ep_req(struct mv_udc *udc, int index,
185185
else
186186
bit_pos = 1 << (16 + curr_req->ep->ep_num);
187187

188-
while ((curr_dqh->curr_dtd_ptr == curr_dtd->td_dma)) {
188+
while (curr_dqh->curr_dtd_ptr == curr_dtd->td_dma) {
189189
if (curr_dtd->dtd_next == EP_QUEUE_HEAD_NEXT_TERMINATE) {
190190
while (readl(&udc->op_regs->epstatus) & bit_pos)
191191
udelay(1);

0 commit comments

Comments
 (0)