From: Mike Frysinger Date: Sun, 1 Nov 2009 10:55:48 -0400 Subject: [U-Boot] [PATCH 08/10] OMAP3 zoom2 Use usbtty if the debug board is not connected. In-Reply-To: <4AED97D8.6090601@windriver.com> References: <1257010667-10834-1-git-send-email-Tom.Rix@windriver.com> <200911010834.01061.vapier@gentoo.org> <4AED97D8.6090601@windriver.com> Message-ID: <200911010955.49329.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sunday 01 November 2009 09:14:48 Tom wrote: > Mike Frysinger wrote: > > On Saturday 31 October 2009 22:03:45 Tom wrote: > >> Mike Frysinger wrote: > >>> On Saturday 31 October 2009 13:37:45 Tom Rix wrote: > >>>> + } else { > >>>> + usbtty_putc(c); > >>>> } > >>> > >>> dont need those braces (same goes for a few other hunks here) > >> > >> This is done because if-statement above use braces. > >> If this was a simple > >> if (foo) > >> smt_1 > >> else > >> smt_2 > >> > >> I would have not use braces. > > > > the trailing "else" clause is one statement. the relationship to the > > previous if section doesnt matter. common style convention is: > > if (foo) { > > statement_1; > > statement_2; > > } else > > statement_3; > > Please see > > http://www.kernel.org/doc/Documentation/CodingStyle > > Do not unnecessarily use braces where a single statement will do. > > if (condition) > action(); > > This does not apply if one branch of a conditional statement is a single > statement. Use braces in both branches. > > if (condition) { > do_this(); > do_that(); > } else { > otherwise(); > } i guess i go by what people are actually accepting at LKML. braces get stripped from single if statements all the time. i dont really care the much since it isnt my code, so if you want to include the cruft anyways, that's your choice. -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20091101/1d9124e8/attachment.pgp