Re: [PATCH] CodingStyle fixes for drm_agpsupport

Jeff Garzik
2003-08-11T17:04:23Z

Larry McVoy wrote:
> A few comments on why I don't like this patch:
> 1) It's a formatting only patch. That screws over people who are using
> BK for debugging, now when I double click on these changes I'll get
> to your cleanup patch, not the patch that was the last substantive
> change.

This is true, but at the same time, in Linux CodingStyle patches
culturally acceptable. I think the general logic is just "don't go
overboard; reformat a tiny fragment at a time."

> 2) "if (expr) statement;" really ought to be considered legit coding style.
> It's a one line "shorty" and it lets you see more of the code on a
> screen.
>
> On the other hand, the author carried things too far when they did
>
> if (expr) statement;
> else statement;
>
> that's too hard for your eyes to parse quickly IMO.

tee hee :) This is why we have Documentation/CodingStyle, for just this
type of discussion.

I actually prefer your "author carried ... too far" example, with the
reasoning: if you _must_ deviate from CodingStyle, at least don't run
the damn lines together like
if (test) foo else bar;
or
if (test) foo
else bar;

The alignment of the statements visually separates out the test more
clearly.

Jeff