#if 0 mm/backing-dev.c:congestion_wait_interruptible()
Subsystems (2)
PATCH 1/1 #if 0 mm/backing-dev.c:congestion_wait_interruptible()
congestion_wait_interruptible() is no longer used.
---
include/linux/backing-dev.h | 1 - mm/backing-dev.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-)
include/linux/backing-dev.h renamed from include/linux/backing-dev.h.old +0 -1
@@ -93,7 +93,6 @@void clear_bdi_congested (struct backing_dev_info *bdi,int rw);void set_bdi_congested (struct backing_dev_info *bdi,int rw);long congestion_wait (int rw,long timeout); -long congestion_wait_interruptible (int rw,long timeout);void congestion_end (int rw);#define bdi_cap_writeback_dirty (bdi) \
mm/backing-dev.c renamed from mm/backing-dev.c.old +2 -0
@@ -55,6 +55,7 @@ }EXPORT_SYMBOL (congestion_wait); +#if 0 long congestion_wait_interruptible (int rw,long timeout) {long ret;
@@ -70,6 +71,7 @@ return ret; }EXPORT_SYMBOL (congestion_wait_interruptible); +#endif /* 0 */ /** * congestion_end - wake up sleepers on a congested backing_dev_info
Quoted 3 lines · Adrian Bunk
congestion_wait_interruptible()is no longer used.Signed-off-by Adrian Bunk <[email protected]>
Ack...
Quoted 35 lines
---
include/linux/backing-dev.h | 1 - mm/backing-dev.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-)include/linux/backing-dev.h renamed from include/linux/backing-dev.h.old +0
-1@@ -93,7 +93,6 @@void clear_bdi_congested (struct backing_dev_info *bdi,int rw);void set_bdi_congested (struct backing_dev_info *bdi,int rw);long congestion_wait (int rw,long timeout); -long congestion_wait_interruptible (int rw,long timeout);void congestion_end (int rw);#define bdi_cap_writeback_dirty (bdi) \mm/backing-dev.c renamed from mm/backing-dev.c.old +2
-0@@ -55,6 +55,7 @@ }EXPORT_SYMBOL (congestion_wait); +#if 0 long congestion_wait_interruptible (int rw,long timeout) {long ret;@@ -70,6 +71,7 @@ return ret; }EXPORT_SYMBOL (congestion_wait_interruptible); +#endif /* 0 */ /** * congestion_end - wake up sleepers on a congested backing_dev_info
Quoted 2 lines · Adrian Bunk
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.
Signature · 3 lines
Jesper Juhl <[email protected]> Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html Plain text mails only, please http://www.expita.com/nomime.html
Quoted 9 lines · Jesper Juhl
Quoted 2 lines · Adrian Bunk
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 later).
My primary intention is to remove dead code from bloating the kernel image, and this way the probability of patch acceptance is higher.
Quoted 1 line
Jesper Juhl
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 7 lines · Adrian Bunk
Quoted 6 lines · Jesper Juhl
Quoted 2 lines · Adrian Bunk
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?
Quoted 8 lines
Quoted 3 lines
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 later).
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?
Quoted 3 lines
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 :-)
Signature · 3 lines
Jesper Juhl <[email protected]> Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html Plain text mails only, please http://www.expita.com/nomime.html