[I can't believe I'm stepping into an indentation flamewar, but here goes...]
> Please change your coding style to conform to Documentation/CodingStyle.
>
> *** Only indent with tabs!! ***
>
> Every one of those examples violates that simple rule.
Yes, Documentation/CodingStyle says that we should only indent with
tabs. However, that simple rule has to be interpreted with some
common sense, and the case of multi-line if conditions is definitely a
case where using only tabs makes code much less readable.
If you want an excuse, you could say that in code like
if (foo___________ &&
bar___________) {
doit;
that the line with "bar" on it is properly indented with one tab
(since it is part of the if statement that is also indented one tab),
and then four spaces are used to align the "bar" with the previous
line. So only tabs are used for indentation, and the spaces after the
tab are used for alignment, and the letter of the law is observed.
If you have a git tree handy, you can do "git show 68380b58" and see
that Linus himself wrote:
if (get_wq_data(work) == cwq
&& work_pending(work)
&& !list_empty(&work->entry)) {
I have to admit that I would have put the &&s at the ends of the
previous lines rather than where Linus put them, but... egads! Linus
put spaces before the &&s to line them up nicely!
"more in the breach" and all that I guess...
- R.
-
| David Miller | Re: Slow DOWN, please!!! |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Heiko Carstens | Re: -mm merge plans for 2.6.23 -- sys_fallocate |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
| Jan Engelhardt | Re: iptables very slow after commit 784544739a25c30637397ace5489eeb6e15d7d49 |
