linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC: 2.6 patch] kernel/sys.c: remove unused exports
@ 2006-06-29 19:19 Adrian Bunk
  2006-06-29 19:36 ` Andrew Morton
  0 siblings, 1 reply; 9+ messages in thread
From: Adrian Bunk @ 2006-06-29 19:19 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

This patch removes the following unused exports:
- EXPORT_SYMBOL:
  - in_egroup_p
- EXPORT_SYMBOL_GPL's:
  - kernel_restart
  - kernel_halt

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

---

@Andrew:
If anyone is considered maintainer of this code, please tell me who it 
is so that I can send this patch to him instead of you.

This patch was already sent on:
- 23 Jun 2006
- 16 May 2006

 kernel/sys.c |    5 -----
 1 file changed, 5 deletions(-)

--- linux-2.6.17-rc4-mm1-full/kernel/sys.c.old	2006-05-16 14:20:27.000000000 +0200
+++ linux-2.6.17-rc4-mm1-full/kernel/sys.c	2006-05-16 14:20:47.000000000 +0200
@@ -615,7 +615,6 @@
 	printk(".\n");
 	machine_restart(cmd);
 }
-EXPORT_SYMBOL_GPL(kernel_restart);
 
 /**
  *	kernel_kexec - reboot the system
@@ -657,8 +656,6 @@
 	machine_halt();
 }
 
-EXPORT_SYMBOL_GPL(kernel_halt);
-
 /**
  *	kernel_power_off - power_off the system
  *
@@ -1665,8 +1662,6 @@
 	return retval;
 }
 
-EXPORT_SYMBOL(in_egroup_p);
-
 DECLARE_RWSEM(uts_sem);
 
 EXPORT_SYMBOL(uts_sem);


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

* Re: [RFC: 2.6 patch] kernel/sys.c: remove unused exports
  2006-06-29 19:19 [RFC: 2.6 patch] kernel/sys.c: remove unused exports Adrian Bunk
@ 2006-06-29 19:36 ` Andrew Morton
  2006-06-29 19:44   ` Andrew Morton
  0 siblings, 1 reply; 9+ messages in thread
From: Andrew Morton @ 2006-06-29 19:36 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: linux-kernel

On Thu, 29 Jun 2006 21:19:40 +0200
Adrian Bunk <bunk@stusta.de> wrote:

> This patch removes the following unused exports:
> - EXPORT_SYMBOL:
>   - in_egroup_p
> - EXPORT_SYMBOL_GPL's:
>   - kernel_restart
>   - kernel_halt

Switch 'em to EXPORT_UNUSED_SYMBOL and I'll stop dropping your patches ;)


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

* Re: [RFC: 2.6 patch] kernel/sys.c: remove unused exports
  2006-06-29 19:36 ` Andrew Morton
@ 2006-06-29 19:44   ` Andrew Morton
  2006-06-29 19:58     ` Adrian Bunk
  0 siblings, 1 reply; 9+ messages in thread
From: Andrew Morton @ 2006-06-29 19:44 UTC (permalink / raw)
  To: bunk, linux-kernel

On Thu, 29 Jun 2006 12:36:08 -0700
Andrew Morton <akpm@osdl.org> wrote:

> On Thu, 29 Jun 2006 21:19:40 +0200
> Adrian Bunk <bunk@stusta.de> wrote:
> 
> > This patch removes the following unused exports:
> > - EXPORT_SYMBOL:
> >   - in_egroup_p
> > - EXPORT_SYMBOL_GPL's:
> >   - kernel_restart
> >   - kernel_halt
> 
> Switch 'em to EXPORT_UNUSED_SYMBOL and I'll stop dropping your patches ;)
> 

If doing this, I'd suggest it be done thusly:

EXPORT_UNUSED_SYMBOL(in_egroup_p);	/* June 2006 */

to aid later decision-making.

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

* Re: [RFC: 2.6 patch] kernel/sys.c: remove unused exports
  2006-06-29 19:44   ` Andrew Morton
@ 2006-06-29 19:58     ` Adrian Bunk
  2006-06-29 20:06       ` Andrew Morton
  0 siblings, 1 reply; 9+ messages in thread
From: Adrian Bunk @ 2006-06-29 19:58 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

On Thu, Jun 29, 2006 at 12:44:00PM -0700, Andrew Morton wrote:
> On Thu, 29 Jun 2006 12:36:08 -0700
> Andrew Morton <akpm@osdl.org> wrote:
> 
> > On Thu, 29 Jun 2006 21:19:40 +0200
> > Adrian Bunk <bunk@stusta.de> wrote:
> > 
> > > This patch removes the following unused exports:
> > > - EXPORT_SYMBOL:
> > >   - in_egroup_p
> > > - EXPORT_SYMBOL_GPL's:
> > >   - kernel_restart
> > >   - kernel_halt
> > 
> > Switch 'em to EXPORT_UNUSED_SYMBOL and I'll stop dropping your patches ;)
> > 
> 
> If doing this, I'd suggest it be done thusly:
> 
> EXPORT_UNUSED_SYMBOL(in_egroup_p);	/* June 2006 */
> 
> to aid later decision-making.

I had some bad experiences with following processes you suggest the 
doesn't remove the symbol immediately:

As you wanted me to do, I scheduled the EXPORT_SYMBOL(insert_resource) 
for removal on 2 May 2005 with both __deprecated_for_modules and an 
entry in feature-removal-schedule.txt with the target date April 2006.

On 11 Apr 2006, I sent the patch to implement this scheduled removal.

As of today, the latter patch is still stuck in -mm (which isn't better 
than having it dropped) although it's long overdue.

Do you understand why I distrust your "to aid later decision-making"?

Can you state publically "If there's still no in-kernel user after six 
months, the removal is automatically ACK'ed."?

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] 9+ messages in thread

* Re: [RFC: 2.6 patch] kernel/sys.c: remove unused exports
  2006-06-29 19:58     ` Adrian Bunk
@ 2006-06-29 20:06       ` Andrew Morton
  2006-06-29 21:18         ` Adrian Bunk
  0 siblings, 1 reply; 9+ messages in thread
From: Andrew Morton @ 2006-06-29 20:06 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: linux-kernel

On Thu, 29 Jun 2006 21:58:28 +0200
Adrian Bunk <bunk@stusta.de> wrote:

> On Thu, Jun 29, 2006 at 12:44:00PM -0700, Andrew Morton wrote:
> > On Thu, 29 Jun 2006 12:36:08 -0700
> > Andrew Morton <akpm@osdl.org> wrote:
> > 
> > > On Thu, 29 Jun 2006 21:19:40 +0200
> > > Adrian Bunk <bunk@stusta.de> wrote:
> > > 
> > > > This patch removes the following unused exports:
> > > > - EXPORT_SYMBOL:
> > > >   - in_egroup_p
> > > > - EXPORT_SYMBOL_GPL's:
> > > >   - kernel_restart
> > > >   - kernel_halt
> > > 
> > > Switch 'em to EXPORT_UNUSED_SYMBOL and I'll stop dropping your patches ;)
> > > 
> > 
> > If doing this, I'd suggest it be done thusly:
> > 
> > EXPORT_UNUSED_SYMBOL(in_egroup_p);	/* June 2006 */
> > 
> > to aid later decision-making.
> 
> I had some bad experiences with following processes you suggest the 
> doesn't remove the symbol immediately:
> 
> As you wanted me to do, I scheduled the EXPORT_SYMBOL(insert_resource) 
> for removal on 2 May 2005 with both __deprecated_for_modules and an 
> entry in feature-removal-schedule.txt with the target date April 2006.
> 
> On 11 Apr 2006, I sent the patch to implement this scheduled removal.
> 
> As of today, the latter patch is still stuck in -mm (which isn't better 
> than having it dropped) although it's long overdue.

Blame Greg ;)

> Do you understand why I distrust your "to aid later decision-making"?

You'll cope.

> Can you state publically "If there's still no in-kernel user after six 
> months, the removal is automatically ACK'ed."?

6 or 12.  We haven't decided.  6 sounds OK.  If nobody complains.  If
they do, we rethink a particular export.

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

* Re: [RFC: 2.6 patch] kernel/sys.c: remove unused exports
  2006-06-29 20:06       ` Andrew Morton
@ 2006-06-29 21:18         ` Adrian Bunk
  2006-07-02 16:52           ` Eric W. Biederman
  0 siblings, 1 reply; 9+ messages in thread
From: Adrian Bunk @ 2006-06-29 21:18 UTC (permalink / raw)
  To: Andrew Morton, Greg KH; +Cc: linux-kernel

On Thu, Jun 29, 2006 at 01:06:33PM -0700, Andrew Morton wrote:
> On Thu, 29 Jun 2006 21:58:28 +0200
> Adrian Bunk <bunk@stusta.de> wrote:
> 
> > On Thu, Jun 29, 2006 at 12:44:00PM -0700, Andrew Morton wrote:
> > > On Thu, 29 Jun 2006 12:36:08 -0700
> > > Andrew Morton <akpm@osdl.org> wrote:
> > > 
> > > > On Thu, 29 Jun 2006 21:19:40 +0200
> > > > Adrian Bunk <bunk@stusta.de> wrote:
> > > > 
> > > > > This patch removes the following unused exports:
> > > > > - EXPORT_SYMBOL:
> > > > >   - in_egroup_p
> > > > > - EXPORT_SYMBOL_GPL's:
> > > > >   - kernel_restart
> > > > >   - kernel_halt
> > > > 
> > > > Switch 'em to EXPORT_UNUSED_SYMBOL and I'll stop dropping your patches ;)
> > > > 
> > > 
> > > If doing this, I'd suggest it be done thusly:
> > > 
> > > EXPORT_UNUSED_SYMBOL(in_egroup_p);	/* June 2006 */
> > > 
> > > to aid later decision-making.
> > 
> > I had some bad experiences with following processes you suggest the 
> > doesn't remove the symbol immediately:
> > 
> > As you wanted me to do, I scheduled the EXPORT_SYMBOL(insert_resource) 
> > for removal on 2 May 2005 with both __deprecated_for_modules and an 
> > entry in feature-removal-schedule.txt with the target date April 2006.
> > 
> > On 11 Apr 2006, I sent the patch to implement this scheduled removal.
> > 
> > As of today, the latter patch is still stuck in -mm (which isn't better 
> > than having it dropped) although it's long overdue.
> 
> Blame Greg ;)

Why?

> > Do you understand why I distrust your "to aid later decision-making"?
> 
> You'll cope.
> 
> > Can you state publically "If there's still no in-kernel user after six 
> > months, the removal is automatically ACK'ed."?
> 
> 6 or 12.  We haven't decided.  6 sounds OK.  If nobody complains.  If
> they do, we rethink a particular export.

OK, I hope I'll have more luck with this process.

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] 9+ messages in thread

* Re: [RFC: 2.6 patch] kernel/sys.c: remove unused exports
  2006-06-29 21:18         ` Adrian Bunk
@ 2006-07-02 16:52           ` Eric W. Biederman
  0 siblings, 0 replies; 9+ messages in thread
From: Eric W. Biederman @ 2006-07-02 16:52 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Andrew Morton, Greg KH, linux-kernel

Adrian Bunk <bunk@stusta.de> writes:

> On Thu, Jun 29, 2006 at 01:06:33PM -0700, Andrew Morton wrote:
>> On Thu, 29 Jun 2006 21:58:28 +0200
>> Adrian Bunk <bunk@stusta.de> wrote:
>> 
>> > On Thu, Jun 29, 2006 at 12:44:00PM -0700, Andrew Morton wrote:
>> > > On Thu, 29 Jun 2006 12:36:08 -0700
>> > > Andrew Morton <akpm@osdl.org> wrote:
>> > > 
>> > > > On Thu, 29 Jun 2006 21:19:40 +0200
>> > > > Adrian Bunk <bunk@stusta.de> wrote:
>> > > > 
>> > > > > - EXPORT_SYMBOL_GPL's:
>> > > > >   - kernel_restart
>> > > > >   - kernel_halt
>> > > > 

So I can comment on kernel_restart and kernel_halt.
I think I come about as close as it comes to a maintainer
of the reboot infrastructure, and I did write those two functions.

The problem is they were created to address is several different
places in the kernel were performing reboots or halts and
did it inconsistently.  with the result that most localized bug
fixes would trigger a bug in another code path.

At the time the functions machine_halt, and machine_reboot were
exported functions.  So when I did the conversions I preserved
the presence of the export.

After all of the dust settled I think only the swap suspend
code calls into that and that code can't be built modular
so I think removing the exports are ok.

The other places that were calling into these code paths
are now calling emergency_restart().

Enough dust has settled and I can't spot any inappropriate
users in the kernel right now so removing those two exports sounds
fine with me.  We can always add them again if we get modular users.

As long as we are not encouraging people to reinvent this interface
badly again  I have no problems.  If I could think of an appropriate
reason why people would calls these interfaces other than in a watchdog driver
I would worry about people calling emergency_restart when the really wanted
kernel_restart, but didn't because they didn't have the export available.

Eric


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

* [RFC: 2.6 patch] kernel/sys.c: remove unused exports
@ 2006-06-23 10:55 Adrian Bunk
  0 siblings, 0 replies; 9+ messages in thread
From: Adrian Bunk @ 2006-06-23 10:55 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

This patch removes the following unused exports:
- EXPORT_SYMBOL:
  - in_egroup_p
- EXPORT_SYMBOL_GPL's:
  - kernel_restart
  - kernel_halt

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

---

This patch was already sent on:
- 16 May 2006

 kernel/sys.c |    5 -----
 1 file changed, 5 deletions(-)

--- linux-2.6.17-rc4-mm1-full/kernel/sys.c.old	2006-05-16 14:20:27.000000000 +0200
+++ linux-2.6.17-rc4-mm1-full/kernel/sys.c	2006-05-16 14:20:47.000000000 +0200
@@ -615,7 +615,6 @@
 	printk(".\n");
 	machine_restart(cmd);
 }
-EXPORT_SYMBOL_GPL(kernel_restart);
 
 /**
  *	kernel_kexec - reboot the system
@@ -657,8 +656,6 @@
 	machine_halt();
 }
 
-EXPORT_SYMBOL_GPL(kernel_halt);
-
 /**
  *	kernel_power_off - power_off the system
  *
@@ -1665,8 +1662,6 @@
 	return retval;
 }
 
-EXPORT_SYMBOL(in_egroup_p);
-
 DECLARE_RWSEM(uts_sem);
 
 EXPORT_SYMBOL(uts_sem);


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

* [RFC: 2.6 patch] kernel/sys.c: remove unused exports
@ 2006-05-16 17:44 Adrian Bunk
  0 siblings, 0 replies; 9+ messages in thread
From: Adrian Bunk @ 2006-05-16 17:44 UTC (permalink / raw)
  To: linux-kernel

This patch removes the following unused exports:
- EXPORT_SYMBOL:
  - in_egroup_p
- EXPORT_SYMBOL_GPL's:
  - kernel_restart
  - kernel_halt

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

---

 kernel/sys.c |    5 -----
 1 file changed, 5 deletions(-)

--- linux-2.6.17-rc4-mm1-full/kernel/sys.c.old	2006-05-16 14:20:27.000000000 +0200
+++ linux-2.6.17-rc4-mm1-full/kernel/sys.c	2006-05-16 14:20:47.000000000 +0200
@@ -615,7 +615,6 @@
 	printk(".\n");
 	machine_restart(cmd);
 }
-EXPORT_SYMBOL_GPL(kernel_restart);
 
 /**
  *	kernel_kexec - reboot the system
@@ -657,8 +656,6 @@
 	machine_halt();
 }
 
-EXPORT_SYMBOL_GPL(kernel_halt);
-
 /**
  *	kernel_power_off - power_off the system
  *
@@ -1665,8 +1662,6 @@
 	return retval;
 }
 
-EXPORT_SYMBOL(in_egroup_p);
-
 DECLARE_RWSEM(uts_sem);
 
 EXPORT_SYMBOL(uts_sem);


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

end of thread, other threads:[~2006-07-02 16:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-29 19:19 [RFC: 2.6 patch] kernel/sys.c: remove unused exports Adrian Bunk
2006-06-29 19:36 ` Andrew Morton
2006-06-29 19:44   ` Andrew Morton
2006-06-29 19:58     ` Adrian Bunk
2006-06-29 20:06       ` Andrew Morton
2006-06-29 21:18         ` Adrian Bunk
2006-07-02 16:52           ` Eric W. Biederman
  -- strict thread matches above, loose matches on Subject: below --
2006-06-23 10:55 Adrian Bunk
2006-05-16 17:44 Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).