Re: [-mm patch] #if 0 mm/backing-dev.c:congestion_wait_interruptible()

From: Jesper Juhl
Date: Fri Jun 15 2007 - 11:31:50 EST

On 13/06/07, Adrian Bunk <bunk@xxxxxxxxx> wrote:
On Tue, Jun 12, 2007 at 02:40:06PM +0200, Jesper Juhl wrote:
> On 12/06/07, Adrian Bunk <bunk@xxxxxxxxx> wrote:
>> congestion_wait_interruptible() is no longer used.
> Remind me again why it is that we add all these #if 0 blocks instead
> of simply removing the unused code?
> It's just creating a janitorial task to go and remove all the #if 0
> bits at a later time, seems like pointless churn to me. If the code
> needs to go, let's just get rid of it in one go instead of two.

The #if 0 also handles all "I want to use this code in 6 months"
comments that might come (and in some rare cases it even gets used

Well, if it is going to be used in 6 months it's just as easy to add
the code back at that point as it is to remove the #if 0 bits. Or
simply not remove it in the first place - if it's going to be used in
6 months, all we gain from #if 0 is slightly smaller binary size for
6 months ... a bit pointless don't you think?

My primary intention is to remove dead code from bloating the kernel
image, and this way the probability of patch acceptance is higher.

I have no objections to removing dead code. That's a fine objective.
My only concern is that eventually we'll be left with a mountain of
code inside #if 0 that noone ever cleans up.

I guess I could start grep'ing the surce for "#if 0" at regular
intervals and removing any instances that were added >6months ago...
Something inside me just screams that I shouldn't have to :-)

Jesper Juhl <jesper.juhl@xxxxxxxxx>
Don't top-post
Plain text mails only, please
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at