Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752735AbbLLOu2 (ORCPT ); Sat, 12 Dec 2015 09:50:28 -0500 Received: from mail-lf0-f45.google.com ([209.85.215.45]:32905 "EHLO mail-lf0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751499AbbLLOu1 (ORCPT ); Sat, 12 Dec 2015 09:50:27 -0500 Subject: Re: [PATCH 10/10] usb: host: ehci-sched: remove unnecessary braces To: "Geyslan G. Bem" , peter.senna@gmail.com References: <1449883170-21225-1-git-send-email-geyslan@gmail.com> <1449883170-21225-11-git-send-email-geyslan@gmail.com> Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Alan Stern , Greg Kroah-Hartman From: Sergei Shtylyov Message-ID: <566C3431.1090808@cogentembedded.com> Date: Sat, 12 Dec 2015 17:50:25 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <1449883170-21225-11-git-send-email-geyslan@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1208 Lines: 39 On 12/12/2015 4:19 AM, Geyslan G. Bem wrote: > 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 > --- > 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 1dc1d5c..f6e828a 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; Parens not needed, especially the first ones. [...] MBR, Sergei -- 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/