From: Linus Torvalds <torvalds@linux-foundation.org>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>,
linux-kernel@vger.kernel.org,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [git pull] PCI pull request for 2.6.27
Date: Wed, 16 Jul 2008 17:38:11 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.1.10.0807161732510.2835@woody.linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.55.0807170109470.30858@cliff.in.clinika.pl>
On Thu, 17 Jul 2008, Maciej W. Rozycki wrote:
>
> Conveniently "for" is short enough for indentation like this:
>
> for (addr = (u8 *) __va(0xf0000);
> addr < (u8 *) __va(0x100000);
> addr += 16) {
> rt = pirq_check_routing_table(addr);
I don't actually like that one very much either.
It's perfectly readable when looking at things closely, but it's not very
nice when quickly "scanning" code visually. It looks like two separate
indents.
Btw, that "code scanning" is not necessarily a bad idea. It's actually
pretty interesting to print code out in a 2-point font (or just open a
terminal and do "ctrl -" several times to make the code basically
unreadable). See if the code flow makes sense from 10,000 feet - you can
pick up overlong functions and various other dubious practices really
clearly (#ifdef's in code etc).
(IOW, the whole point of the exercise is to _not_ be able to actually read
the code, but just look at the _shape_ of it).
Btw, that commit also did things like change the coding style to a
non-kernel coding style by changing
static int function(xyz..)
to
static int
function(xyz..)
just to make lines shorter. Again - introducing bigger problems than it
actually fixes.
Linus
next prev parent reply other threads:[~2008-07-17 0:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-16 23:39 Jesse Barnes
2008-07-16 23:50 ` Linus Torvalds
2008-07-16 23:54 ` Jesse Barnes
2008-07-17 0:23 ` Maciej W. Rozycki
2008-07-17 0:38 ` Linus Torvalds [this message]
2008-07-17 0:28 ` Linus Torvalds
2008-07-21 13:57 ` [patch] acpi: fix crash in core ACPI code, triggered by CONFIG_ACPI_PCI_SLOT=y Ingo Molnar
2008-07-21 18:38 ` Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.1.10.0807161732510.2835@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=macro@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®