Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1288918 > unrolled thread

[PATCH 4/4] usb: musb: remove redundant condition

Started by"Geyslan G. Bem" <geyslan@gmail.com>
First post2015-12-10 22:00 +0100
Last post2015-12-10 22:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4/4] usb: musb: remove redundant condition "Geyslan G. Bem" <geyslan@gmail.com> - 2015-12-10 22:00 +0100

#1288918 — [PATCH 4/4] usb: musb: remove redundant condition

From"Geyslan G. Bem" <geyslan@gmail.com>
Date2015-12-10 22:00 +0100
Subject[PATCH 4/4] usb: musb: remove redundant condition
Message-ID<qEgtI-2KO-9@gated-at.bofh.it>
This patch removes redundant condition.

 (!A || (A && B)) is the same as (!A || B).

Fixes indentation too.

Tested by: compilation only
Caught by: cppcheck

Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
---
 drivers/usb/musb/musb_gadget.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 67ad630..87bd578 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -353,9 +353,8 @@ static void txstate(struct musb *musb, struct musb_request *req)
 					 *	1	>0	Yes(FS bulk)
 					 */
 					if (!musb_ep->hb_mult ||
-						(musb_ep->hb_mult &&
-						 can_bulk_split(musb,
-						    musb_ep->type)))
+					    can_bulk_split(musb,
+							   musb_ep->type))
 						csr |= MUSB_TXCSR_AUTOSET;
 				}
 				csr &= ~MUSB_TXCSR_P_UNDERRUN;
-- 
2.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web