Re: coding style for long conditions

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Roland Dreier <rdreier@...>
Cc: Stefan Richter <stefanr@...>, Jan Engelhardt <jengelh@...>, Randy Dunlap <randy.dunlap@...>, Tony Lindgren <tony@...>, <linux-kernel@...>
Date: Friday, April 6, 2007 - 6:05 pm

On Friday 06 April 2007 2:38 pm, Roland Dreier wrote:

At least you weren't the target of attacks there ... for daring to
actually follow the only published Linux style guide in that area!!



Having a style guide is supposed to mean, among other things, that
following it gives you "safe harbor".  Sigh.



Yeah, well even the chief penguin wrangler has occasionally
admitted to human imperfections.  Not exclusively related to
the 0.99 kernel series, either ...  ;)

 

I approve in particular of that location:  beginning of line, where
they aren't masking the intent of the condition from a casual scan.
If there's a "right" place, that's it.

In particular, if you see lots of "&&" or "||" neatly lined up it
helps you understand something about when the conditional's body
will execute without needing to read to the end of every line.



Yeah, nobody likes style nazis.  On the other hand, it's rather
unusual to be the target of style nazism for actually following
the style guide!!  You'd think that maybe the folk objecting to
that style guide might maybe choose a more direct way to address
their particular frustrations, eh?  :)

- Dave


-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 20/90] ARM: OMAP: gpio init section cleanups, Tony Lindgren, (Wed Apr 4, 2:04 pm)
[PATCH 21/90] ARM: OMAP: gpio object shrinkage, cleanup, Tony Lindgren, (Wed Apr 4, 2:05 pm)
[PATCH 23/90] ARM: OMAP: PalmZ71 extra brace fix, Tony Lindgren, (Wed Apr 4, 2:05 pm)
[PATCH 24/90] ARM: OMAP: Fix typo in gpio, Tony Lindgren, (Wed Apr 4, 2:05 pm)
[PATCH 25/90] ARM: OMAP: h4 must have blinky leds!!, Tony Lindgren, (Wed Apr 4, 2:05 pm)
Re: [PATCH 25/90] ARM: OMAP: h4 must have blinky leds!!, Dmitry Torokhov, (Wed Apr 4, 4:47 pm)
Re: [PATCH 25/90] ARM: OMAP: h4 must have blinky leds!!, David Brownell, (Wed Apr 4, 4:59 pm)
Re: [PATCH 25/90] ARM: OMAP: h4 must have blinky leds!!, Jan Engelhardt, (Wed Apr 4, 4:06 pm)
Re: [PATCH 25/90] ARM: OMAP: h4 must have blinky leds!!, David Brownell, (Wed Apr 4, 4:51 pm)
Re: [PATCH 25/90] ARM: OMAP: h4 must have blinky leds!!, Jan Engelhardt, (Wed Apr 4, 10:15 pm)
Re: [PATCH 25/90] ARM: OMAP: h4 must have blinky leds!!, Randy Dunlap, (Thu Apr 5, 12:18 am)
Re: [PATCH 25/90] ARM: OMAP: h4 must have blinky leds!!, David Brownell, (Thu Apr 5, 2:19 pm)
Re: [PATCH 25/90] ARM: OMAP: h4 must have blinky leds!!, Jan Engelhardt, (Thu Apr 5, 4:35 pm)
Re: coding style for long conditions, Junio C Hamano, (Sat Apr 7, 4:01 am)
Re: coding style for long conditions, David Brownell, (Mon Apr 9, 11:14 am)
Re: coding style for long conditions, Roland Dreier, (Fri Apr 6, 5:38 pm)
Re: coding style for long conditions, Scott Preece, (Mon Apr 9, 11:45 am)
Re: coding style for long conditions, David Brownell, (Fri Apr 6, 6:05 pm)
Re: coding style for long conditions, Jan Engelhardt, (Fri Apr 6, 6:07 pm)
Re: coding style for long conditions, David Brownell, (Fri Apr 6, 6:43 pm)
Re: coding style for long conditions, Zan Lynx, (Fri Apr 6, 5:50 pm)
Re: coding style for long conditions (WAS: Re: [PATCH 25/90]..., Jeremy Fitzhardinge, (Fri Apr 6, 5:37 pm)
Re: [PATCH 25/90] ARM: OMAP: h4 must have blinky leds!!, Dmitry Torokhov, (Wed Apr 4, 4:42 pm)
Re: [PATCH 25/90] ARM: OMAP: h4 must have blinky leds!!, David Brownell, (Wed Apr 4, 3:13 pm)
[PATCH 27/90] ARM: OMAP: Add minimal OMAP2430 support, Tony Lindgren, (Wed Apr 4, 2:05 pm)
[PATCH 28/90] ARM: OMAP: USB peripheral support on H4, Tony Lindgren, (Wed Apr 4, 2:05 pm)
[PATCH 29/90] ARM: OMAP: Palm Tungsten|T support, Tony Lindgren, (Wed Apr 4, 2:05 pm)
Re: [PATCH 29/90] ARM: OMAP: Palm Tungsten|T support, Pavel Machek, (Fri Apr 6, 8:09 am)
Re: [PATCH 29/90] ARM: OMAP: Palm Tungsten|T support, Russell King, (Sun Apr 8, 8:07 am)
Re: [PATCH 29/90] ARM: OMAP: Palm Tungsten|T support, Pavel Machek, (Sun Apr 8, 8:12 am)
Re: [PATCH 29/90] ARM: OMAP: Palm Tungsten|T support, Russell King, (Sun Apr 8, 10:40 am)
Re: [PATCH 29/90] ARM: OMAP: Palm Tungsten|T support, Pavel Machek, (Mon Apr 9, 7:13 am)
Re: [PATCH 29/90] ARM: OMAP: Palm Tungsten|T support, Russell King, (Sun Apr 8, 9:58 am)
Re: [PATCH 29/90] ARM: OMAP: Palm Tungsten|T support, Dagfinn Ilmari , (Sun Apr 8, 8:31 am)
[PATCH 30/90] ARM: OMAP: Palm Zire71 minor fixes, Tony Lindgren, (Wed Apr 4, 2:05 pm)
[PATCH 31/90] ARM: OMAP: plat-omap changes for 2430 SDP, Tony Lindgren, (Wed Apr 4, 2:05 pm)
[PATCH 32/90] ARM: OMAP: Basic support for siemens sx1, Tony Lindgren, (Wed Apr 4, 2:05 pm)
[PATCH 35/90] ARM: OMAP: speed up gpio irq handling, Tony Lindgren, (Wed Apr 4, 2:05 pm)
[PATCH 36/90] ARM: OMAP: Fix typo in board-h4.h, Tony Lindgren, (Wed Apr 4, 2:05 pm)
[PATCH 37/90] ARM: OMAP: MPUIO wake updates, Tony Lindgren, (Wed Apr 4, 2:05 pm)
[PATCH 38/90] ARM: OMAP: Sync headers with linux-omap, Tony Lindgren, (Wed Apr 4, 2:05 pm)
[PATCH 39/90] ARM: OMAP: Sync core code with linux-omap, Tony Lindgren, (Wed Apr 4, 2:05 pm)
[PATCH 42/90] ARM: OMAP: Tabify mux.c, Tony Lindgren, (Wed Apr 4, 2:05 pm)
[PATCH 43/90] ARM: OMAP: TUSB EVM init, Tony Lindgren, (Wed Apr 4, 2:05 pm)
Re: [PATCH 43/90] ARM: OMAP: TUSB EVM init, Randy Dunlap, (Wed Apr 4, 2:44 pm)
Re: [PATCH 43/90] ARM: OMAP: TUSB EVM init, Tony Lindgren, (Thu Apr 5, 10:42 am)
[PATCH 44/90] ARM: OMAP: Add mailbox support for IVA, Tony Lindgren, (Wed Apr 4, 2:05 pm)
[PATCH 45/90] ARM: OMAP: Update omap h2 defconfig, Tony Lindgren, (Wed Apr 4, 2:05 pm)
[PATCH 46/90] ARM: OMAP: Add omap osk defconfig, Tony Lindgren, (Wed Apr 4, 2:05 pm)
[PATCH 47/90] ARM: OMAP: Fix gpmc header, Tony Lindgren, (Wed Apr 4, 2:05 pm)
[PATCH 48/90] ARM: OMAP: I2C-1 init fix for 2430, Tony Lindgren, (Wed Apr 4, 2:05 pm)
[PATCH 52/90] ARM: OMAP: cleanup apollon board, Tony Lindgren, (Wed Apr 4, 2:05 pm)
[PATCH 53/90] ARM: OMAP: Fix warning in timer32k.c, Tony Lindgren, (Wed Apr 4, 2:05 pm)
Re: [PATCH 53/90] ARM: OMAP: Fix warning in timer32k.c, Randy Dunlap, (Wed Apr 4, 3:14 pm)
Re: [PATCH 53/90] ARM: OMAP: Fix warning in timer32k.c, Tony Lindgren, (Thu Apr 5, 11:15 am)
[PATCH 54/90] ARM: OMAP: Update timer32k.c to compile, Tony Lindgren, (Wed Apr 4, 2:05 pm)
[PATCH 55/90] ARM: OMAP: H3 workqueue fixes, Tony Lindgren, (Wed Apr 4, 2:05 pm)
Re: [PATCH 55/90] ARM: OMAP: H3 workqueue fixes, Tony Lindgren, (Thu Apr 5, 11:17 am)
[PATCH 63/90] ARM: OMAP: Merge PM code from N800 tree, Tony Lindgren, (Wed Apr 4, 2:05 pm)
[PATCH 64/90] ARM: OMAP: Fix warning in pm.c, Tony Lindgren, (Wed Apr 4, 2:05 pm)
Re: [PATCH 64/90] ARM: OMAP: Fix warning in pm.c, Tony Lindgren, (Thu Apr 5, 11:18 am)
[PATCH 69/90] ARM: OMAP: add SoSSI clock, Tony Lindgren, (Wed Apr 4, 2:05 pm)
[PATCH 79/90] ARM: OMAP: fix H4 dependencies again, Tony Lindgren, (Wed Apr 4, 2:05 pm)
[PATCH 80/90] ARM: OMAP: partial LED fixes, Tony Lindgren, (Wed Apr 4, 2:05 pm)
[PATCH 81/90] ARM: OMAP: omap2/pm.c build fix, Tony Lindgren, (Wed Apr 4, 2:06 pm)
[PATCH 82/90] ARM: OMAP: restore CONFIG_GENERIC_TIME, Tony Lindgren, (Wed Apr 4, 2:06 pm)
[PATCH 88/90] ARM: OMAP: OSK led fixes, Tony Lindgren, (Wed Apr 4, 2:06 pm)