All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] Why keeping lines commented out via #if 0?
Date: Sat, 02 Jun 2007 14:59:10 +0000	[thread overview]
Message-ID: <20070602145910.GV23968@parisc-linux.org> (raw)
In-Reply-To: <200706021359.23564.lists-receive@programmierforen.de>

On Sat, Jun 02, 2007 at 11:59:22AM +0000, Andi Drebes wrote:
> I recently grep'd through the kernel sources and found *a lot* of lines
> that are commented out using #if 0. Is there any reason to keep them?

Yes -- the people who wrote the code originally put them there.  Unless
you're willing to go through each one, and figure out whether it's still
useful or not for anyone reading this section of code later, it's
better to leave it alone.

Why are comments considered useful, yet commented-out sections of code
considered worthy of deletion?  The latter are potentially more useful.
Of course things can be taken too far and #if 0 / #if 1 sections can
clutter up the function and make it harder to understand.  But each one
needs to be taken in context and understood, not mindlessly excised.

I think the kernel-janitors need a Hypocritic Oath.  First, do no harm.
I'm a little sensitive to so-called 'trivial' changes right now, given
that Kyle just spent two days tracking down breakages on parisc from
these kinds of patches.

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors

  parent reply	other threads:[~2007-06-02 14:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-02 11:59 [KJ] Why keeping lines commented out via #if 0? Andi Drebes
2007-06-02 13:15 ` Robert P. J. Day
2007-06-02 14:59 ` Matthew Wilcox [this message]
2007-06-02 15:29 ` Robert P. J. Day
2007-06-02 15:47 ` Matthew Wilcox
2007-06-02 16:48 ` Robert P. J. Day
2007-06-02 18:00 ` Andi Drebes
2007-06-02 18:13 ` Arnaldo Carvalho de Melo
2007-06-02 18:31 ` Andi Drebes
2007-06-02 18:47 ` Thomas De Schampheleire
2007-06-03  8:09 ` Robert P. J. Day
2007-06-03  9:12 ` Rene Herman
2007-06-03 10:47 ` Andi Drebes
2007-07-02 10:43 ` Vegard Nossum
2007-07-02 11:07 ` Robert P. J. Day

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=20070602145910.GV23968@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=kernel-janitors@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.