usb: dwc2: gadget: Use true and false for boolean values
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Tue, 23 Jan 2018 15:45:31 +0000 (09:45 -0600)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 13 Mar 2018 08:47:50 +0000 (10:47 +0200)
Assign true or false to boolean variables instead of an integer value.

This issue was detected with the help of Coccinelle.

Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/gadget.c

index d67f9ae..5d91ff9 100644 (file)
@@ -116,10 +116,10 @@ static inline void dwc2_gadget_incr_frame_num(struct dwc2_hsotg_ep *hs_ep)
 {
        hs_ep->target_frame += hs_ep->interval;
        if (hs_ep->target_frame > DSTS_SOFFN_LIMIT) {
-               hs_ep->frame_overrun = 1;
+               hs_ep->frame_overrun = true;
                hs_ep->target_frame &= DSTS_SOFFN_LIMIT;
        } else {
-               hs_ep->frame_overrun = 0;
+               hs_ep->frame_overrun = false;
        }
 }