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


Groups > linux.kernel > #1290645

[PATCH v3 10/10] usb: host: ehci-sched: remove unnecessary braces

From "Geyslan G. Bem" <geyslan@gmail.com>
Newsgroups linux.kernel
Subject [PATCH v3 10/10] usb: host: ehci-sched: remove unnecessary braces
Date 2015-12-13 18:10 +0100
Message-ID <qFijL-2IN-1@gated-at.bofh.it> (permalink)
References <qFijL-2IN-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


This patch removes unnecessary braces in single statement blocks at the
same time as replaces the if statement with a ternary conditional.

Tested by compilation only.
Caught by checkpatch.

Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
---
  v2: removes unnecessary parens in ternary conditional.
---
 drivers/usb/host/ehci-sched.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
index 90427fe..30f8c09 100644
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -1060,11 +1060,7 @@ iso_stream_init(
 	epnum = usb_pipeendpoint(urb->pipe);
 	is_input = usb_pipein(urb->pipe) ? USB_DIR_IN : 0;
 	maxp = usb_endpoint_maxp(&urb->ep->desc);
-	if (is_input) {
-		buf1 = (1 << 11);
-	} else {
-		buf1 = 0;
-	}
+	buf1 = is_input ? 1 << 11 : 0;
 
 	/* knows about ITD vs SITD */
 	if (dev->speed == USB_SPEED_HIGH) {
-- 
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/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH v3 10/10] usb: host: ehci-sched: remove unnecessary braces "Geyslan G. Bem" <geyslan@gmail.com> - 2015-12-13 18:10 +0100

csiph-web