[lkml]   [2003]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] CodingStyle fixes for drm_agpsupport
On Mon, Aug 11, 2003 at 01:15:58PM -0400, Jeff Garzik wrote:
> > if (expr) statement; // OK
> The test and the statement run together visually, which is it is
> preferred to put the statement on the following line.


if (!p) return (whatever);
if (foo) {
} else {
if (!p) return (whatever);

Perfectly readable. We have a few hundred thousand lines of code written
like this and I review all of it. I suspect that I do more reviewing than
99% of the people on this list which makes my opinion count more because
anything that makes my tired eyes absorb the info faster is a good thing.
Same for your eyes when you get to my age.

I also make people do

if ((a <= B) || (c >= d)) {

even though I know, if I think about it, what the precedence is. It doesn't
matter that I know or you know, what matters is the number of lines of code
a day you can correctly review. Anything that helps that means that you
are helping people make the source base better. Try reading 30K lines of
diffs at one sitting and tell me again that I'm wrong. If you do, bump it
up to 60K lines :)

> > if (!pointer) return (-EINVAL);
> >
> >Short, sweet, readable, no worries.
> return is not a function ;-)

See, there is that age thing again. Think V6. And it is sort of a function,
it unravels the stack frame.
Larry McVoy lm at
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:47    [W:0.131 / U:2.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site