Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752202AbbLMEFI (ORCPT ); Sat, 12 Dec 2015 23:05:08 -0500 Received: from mail-qg0-f47.google.com ([209.85.192.47]:35468 "EHLO mail-qg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752153AbbLMEFD (ORCPT ); Sat, 12 Dec 2015 23:05:03 -0500 From: "Geyslan G. Bem" To: peter.senna@gmail.com Cc: "Geyslan G. Bem" , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Alan Stern , Greg Kroah-Hartman Subject: [PATCH v2 10/10] usb: host: ehci-sched: remove unnecessary braces Date: Sun, 13 Dec 2015 01:03:48 -0300 Message-Id: <1449979438-12038-11-git-send-email-geyslan@gmail.com> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1449979438-12038-1-git-send-email-geyslan@gmail.com> References: <1449979438-12038-1-git-send-email-geyslan@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1178 Lines: 38 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 --- 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 31fc788..849f45c 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/