public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [-mm patch] #if 0 mm/backing-dev.c:congestion_wait_interruptible()
@ 2007-06-12 11:07 Adrian Bunk
  2007-06-12 12:23 ` Trond Myklebust
  2007-06-12 12:40 ` Jesper Juhl
  0 siblings, 2 replies; 8+ messages in thread
From: Adrian Bunk @ 2007-06-12 11:07 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: Trond Myklebust, linux-kernel

congestion_wait_interruptible() is no longer used.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 include/linux/backing-dev.h |    1 -
 mm/backing-dev.c            |    2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)

--- linux-2.6.22-rc4-mm2/include/linux/backing-dev.h.old	2007-06-12 01:21:52.000000000 +0200
+++ linux-2.6.22-rc4-mm2/include/linux/backing-dev.h	2007-06-12 01:22:00.000000000 +0200
@@ -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) \
--- linux-2.6.22-rc4-mm2/mm/backing-dev.c.old	2007-06-12 01:22:07.000000000 +0200
+++ linux-2.6.22-rc4-mm2/mm/backing-dev.c	2007-06-12 01:22:25.000000000 +0200
@@ -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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [-mm patch] #if 0 mm/backing-dev.c:congestion_wait_interruptible()
  2007-06-12 11:07 [-mm patch] #if 0 mm/backing-dev.c:congestion_wait_interruptible() Adrian Bunk
@ 2007-06-12 12:23 ` Trond Myklebust
  2007-06-12 12:40 ` Jesper Juhl
  1 sibling, 0 replies; 8+ messages in thread
From: Trond Myklebust @ 2007-06-12 12:23 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Peter Zijlstra, linux-kernel

On Tue, 2007-06-12 at 13:07 +0200, Adrian Bunk wrote:
> congestion_wait_interruptible() is no longer used.
> 
> Signed-off-by: Adrian Bunk <bunk@stusta.de>

Ack...

> ---
> 
>  include/linux/backing-dev.h |    1 -
>  mm/backing-dev.c            |    2 ++
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> --- linux-2.6.22-rc4-mm2/include/linux/backing-dev.h.old	2007-06-12 01:21:52.000000000 +0200
> +++ linux-2.6.22-rc4-mm2/include/linux/backing-dev.h	2007-06-12 01:22:00.000000000 +0200
> @@ -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) \
> --- linux-2.6.22-rc4-mm2/mm/backing-dev.c.old	2007-06-12 01:22:07.000000000 +0200
> +++ linux-2.6.22-rc4-mm2/mm/backing-dev.c	2007-06-12 01:22:25.000000000 +0200
> @@ -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
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [-mm patch] #if 0 mm/backing-dev.c:congestion_wait_interruptible()
  2007-06-12 11:07 [-mm patch] #if 0 mm/backing-dev.c:congestion_wait_interruptible() Adrian Bunk
  2007-06-12 12:23 ` Trond Myklebust
@ 2007-06-12 12:40 ` Jesper Juhl
  2007-06-12 22:57   ` Adrian Bunk
  1 sibling, 1 reply; 8+ messages in thread
From: Jesper Juhl @ 2007-06-12 12:40 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Peter Zijlstra, Trond Myklebust, linux-kernel

On 12/06/07, Adrian Bunk <bunk@stusta.de> 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.

-- 
Jesper Juhl <jesper.juhl@gmail.com>
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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [-mm patch] #if 0 mm/backing-dev.c:congestion_wait_interruptible()
  2007-06-12 12:40 ` Jesper Juhl
@ 2007-06-12 22:57   ` Adrian Bunk
  2007-06-15 15:31     ` Jesper Juhl
  0 siblings, 1 reply; 8+ messages in thread
From: Adrian Bunk @ 2007-06-12 22:57 UTC (permalink / raw)
  To: Jesper Juhl; +Cc: Peter Zijlstra, Trond Myklebust, linux-kernel

On Tue, Jun 12, 2007 at 02:40:06PM +0200, Jesper Juhl wrote:
> On 12/06/07, Adrian Bunk <bunk@stusta.de> 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 
later).

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

> Jesper Juhl

cu
Adrian

-- 

       "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 Seed


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [-mm patch] #if 0 mm/backing-dev.c:congestion_wait_interruptible()
  2007-06-12 22:57   ` Adrian Bunk
@ 2007-06-15 15:31     ` Jesper Juhl
  0 siblings, 0 replies; 8+ messages in thread
From: Jesper Juhl @ 2007-06-15 15:31 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Peter Zijlstra, Trond Myklebust, linux-kernel

On 13/06/07, Adrian Bunk <bunk@stusta.de> wrote:
> On Tue, Jun 12, 2007 at 02:40:06PM +0200, Jesper Juhl wrote:
> > On 12/06/07, Adrian Bunk <bunk@stusta.de> 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
> 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?

> 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@gmail.com>
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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [-mm patch] #if 0 mm/backing-dev.c:congestion_wait_interruptible()
@ 2007-07-01 20:20 Adrian Bunk
  2007-07-03 21:48 ` Andrew Morton
  0 siblings, 1 reply; 8+ messages in thread
From: Adrian Bunk @ 2007-07-01 20:20 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Peter Zijlstra, Trond Myklebust, linux-kernel

congestion_wait_interruptible() is no longer used.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no>

---

This patch has been sent on:
- 12 Jun 2007

 include/linux/backing-dev.h |    1 -
 mm/backing-dev.c            |    2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)

--- linux-2.6.22-rc4-mm2/include/linux/backing-dev.h.old	2007-06-12 01:21:52.000000000 +0200
+++ linux-2.6.22-rc4-mm2/include/linux/backing-dev.h	2007-06-12 01:22:00.000000000 +0200
@@ -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) \
--- linux-2.6.22-rc4-mm2/mm/backing-dev.c.old	2007-06-12 01:22:07.000000000 +0200
+++ linux-2.6.22-rc4-mm2/mm/backing-dev.c	2007-06-12 01:22:25.000000000 +0200
@@ -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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [-mm patch] #if 0 mm/backing-dev.c:congestion_wait_interruptible()
  2007-07-01 20:20 Adrian Bunk
@ 2007-07-03 21:48 ` Andrew Morton
  2007-07-03 22:35   ` Trond Myklebust
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2007-07-03 21:48 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Peter Zijlstra, Trond Myklebust, linux-kernel

On Sun, 1 Jul 2007 22:20:51 +0200
Adrian Bunk <bunk@stusta.de> wrote:

> congestion_wait_interruptible() is no longer used.

We might as well just delete it?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [-mm patch] #if 0 mm/backing-dev.c:congestion_wait_interruptible()
  2007-07-03 21:48 ` Andrew Morton
@ 2007-07-03 22:35   ` Trond Myklebust
  0 siblings, 0 replies; 8+ messages in thread
From: Trond Myklebust @ 2007-07-03 22:35 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Adrian Bunk, Peter Zijlstra, linux-kernel

On Tue, 2007-07-03 at 14:48 -0700, Andrew Morton wrote:
> On Sun, 1 Jul 2007 22:20:51 +0200
> Adrian Bunk <bunk@stusta.de> wrote:
> 
> > congestion_wait_interruptible() is no longer used.
> 
> We might as well just delete it?

I agree. We're better off deleting it, but either would be fine by me.

Trond


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-07-03 22:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-12 11:07 [-mm patch] #if 0 mm/backing-dev.c:congestion_wait_interruptible() Adrian Bunk
2007-06-12 12:23 ` Trond Myklebust
2007-06-12 12:40 ` Jesper Juhl
2007-06-12 22:57   ` Adrian Bunk
2007-06-15 15:31     ` Jesper Juhl
  -- strict thread matches above, loose matches on Subject: below --
2007-07-01 20:20 Adrian Bunk
2007-07-03 21:48 ` Andrew Morton
2007-07-03 22:35   ` Trond Myklebust

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox