Skip to contentSkip to conversation

usb: whci: fhci: remove comparison to bool

PATCH In review Geyslan G. Bem 2 participants 2 messages Dec 2, 2015 – Dec 7, 2015 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: whci: fhci: remove comparison to bool

Get rid of bool explicit comparisons.

Caught by Coccinelle.

---
 drivers/usb/host/fhci-tds.c  | 2 +-
 drivers/usb/host/whci/qset.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/usb/host/fhci-tds.c +1 -1
index 1498061..f82ad5d 100644
@@ -85,7 +85,7 @@ static struct usb_td __iomem *next_bd(struct usb_td __iomem *base,
 
 void fhci_push_dummy_bd(struct endpoint *ep)
 {
-	if (ep->already_pushed_dummy_bd == false) {
+	if (!ep->already_pushed_dummy_bd) {
 		u16 td_status = in_be16(&ep->empty_td->status);
 
 		out_be32(&ep->empty_td->buf_ptr, DUMMY_BD_BUFFER);
drivers/usb/host/whci/qset.c +1 -1
index 3297473..5e48a60 100644
@@ -395,7 +395,7 @@ static void urb_dequeue_work(struct work_struct *work)
 	struct whc *whc = qset->whc;
 	unsigned long flags;
 
-	if (wurb->is_async == true)
+	if (wurb->is_async)
 		asl_update(whc, WUSBCMD_ASYNC_UPDATED
 			   | WUSBCMD_ASYNC_SYNCED_DB
 			   | WUSBCMD_ASYNC_QSET_RM);
Signature · 1 line
2.6.3
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Geyslan G. Bem

Get rid of bool explicit comparisons.

Caught by Coccinelle.

I would mention the path to the .cocci script, but other than that:

Quoted 36 lines
---
 drivers/usb/host/fhci-tds.c  | 2 +-
 drivers/usb/host/whci/qset.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/usb/host/fhci-tds.c +1 -1
index 1498061..f82ad5d 100644
@@ -85,7 +85,7 @@ static struct usb_td __iomem *next_bd(struct usb_td __iomem *base,
 
 void fhci_push_dummy_bd(struct endpoint *ep)
 {
-       if (ep->already_pushed_dummy_bd == false) {
+       if (!ep->already_pushed_dummy_bd) {
                u16 td_status = in_be16(&ep->empty_td->status);
 
                out_be32(&ep->empty_td->buf_ptr, DUMMY_BD_BUFFER);
drivers/usb/host/whci/qset.c +1 -2
index 3297473..5e48a60 100644
@@ -395,7 +395,7 @@ static void urb_dequeue_work(struct work_struct *work)
        struct whc *whc = qset->whc;
        unsigned long flags;
 
-       if (wurb->is_async == true)
+       if (wurb->is_async)
                asl_update(whc, WUSBCMD_ASYNC_UPDATED
                           | WUSBCMD_ASYNC_SYNCED_DB
                           | WUSBCMD_ASYNC_QSET_RM);
--

2.6.3

Signature · 1 line
Peter