Skip to contentSkip to conversation

usb: dwc2: gadget: Use true and false for boolean values

PATCH In review Gustavo A. R. Silva 2 participants 2 messages Jan 23, 2018 – Feb 5, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: dwc2: gadget: Use true and false for boolean values

Assign true or false to boolean variables instead of an integer value.

This issue was detected with the help of Coccinelle.

---
 drivers/usb/dwc2/gadget.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/dwc2/gadget.c +2 -2
index e4c3ce0..1f684dd 100644
@@ -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;
 	}
 }
 
Acked-by on v1 1/1
#1 lore raw
Quoted 17 lines · Gustavo A. R. Silva

Assign true or false to boolean variables instead of an integer value.

This issue was detected with the help of Coccinelle.

---
  drivers/usb/dwc2/gadget.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/dwc2/gadget.c +0 -0
index e4c3ce0..1f684dd 100644
@@ -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;

drivers/usb/dwc2/gadget.c static inline void dwc2_gadget_incr_frame_num(struct dwc2_hsotg_ep *hs_ep) · line 125

Quoted 10 lines
drivers/usb/dwc2/gadget.c +2 -2
  	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;
  	}
  }
 

+Felipe

Regards,
John
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html