kernel/sys.c: remove unused exports
RFC PATCH 1/1 kernel/sys.c: remove unused exports
This patch removes the following unused exports:
- EXPORT_SYMBOL:
- in_egroup_p
- EXPORT_SYMBOL_GPL's:
- kernel_restart
- kernel_halt
---
@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(-)
kernel/sys.c renamed from kernel/sys.c.old +0 -5
@@ -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);
Quoted 6 lines · On Thu, 29 Jun 2006 21:19:40 +0200 Adrian Bunk <[email protected]> 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 ;)
Quoted 12 lines · On Thu, 29 Jun 2006 12:36:08 -0700 Andrew Morton <[email protected]> wrote:
Quoted 6 lines · On Thu, 29 Jun 2006 21:19:40 +0200 Adrian Bunk <[email protected]> wrote:
This patch removes the following unused exports:
-EXPORT_SYMBOL:
-in_egroup_p
- EXPORT_SYMBOL_GPL's:
-kernel_restart
-kernel_haltSwitch 'em to
EXPORT_UNUSED_SYMBOLand 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.
Quoted 13 lines · Andrew Morton
Quoted 10 lines · On Thu, 29 Jun 2006 12:36:08 -0700 Andrew Morton <[email protected]> wrote:
Quoted 6 lines · On Thu, 29 Jun 2006 21:19:40 +0200 Adrian Bunk <[email protected]> wrote:
This patch removes the following unused exports:
-EXPORT_SYMBOL:
-in_egroup_p
- EXPORT_SYMBOL_GPL's:
-kernel_restart
-kernel_halt
Quoted 8 lines
Quoted 2 lines
Switch 'em to
EXPORT_UNUSED_SYMBOLand 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
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 26 lines · On Thu, 29 Jun 2006 21:58:28 +0200 Adrian Bunk <[email protected]> wrote:
Quoted 13 lines · Andrew Morton
Quoted 10 lines · On Thu, 29 Jun 2006 12:36:08 -0700 Andrew Morton <[email protected]> wrote:
Quoted 6 lines · On Thu, 29 Jun 2006 21:19:40 +0200 Adrian Bunk <[email protected]> wrote:
This patch removes the following unused exports:
-EXPORT_SYMBOL:
-in_egroup_p
- EXPORT_SYMBOL_GPL's:
-kernel_restart
-kernel_haltQuoted 8 lines
Quoted 2 lines
Switch 'em to
EXPORT_UNUSED_SYMBOLand 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:
Quoted 8 lines
As you wanted me to do, I scheduled the
EXPORT_SYMBOL(insert_resource)for removal on 2 May 2005 with both__deprecated_for_modulesand 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 ;)
Quoted 1 line
Do you understand why I distrust your "to aid later decision-making"?
You'll cope.
Quoted 2 lines
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.
Quoted 33 lines · Andrew Morton
Quoted 30 lines · On Thu, 29 Jun 2006 21:58:28 +0200 Adrian Bunk <[email protected]> wrote:
Quoted 13 lines · Andrew Morton
Quoted 10 lines · On Thu, 29 Jun 2006 12:36:08 -0700 Andrew Morton <[email protected]> wrote:
Quoted 6 lines · On Thu, 29 Jun 2006 21:19:40 +0200 Adrian Bunk <[email protected]> wrote:
This patch removes the following unused exports:
-EXPORT_SYMBOL:
-in_egroup_p
- EXPORT_SYMBOL_GPL's:
-kernel_restart
-kernel_haltQuoted 8 lines
Quoted 2 lines
Switch 'em to
EXPORT_UNUSED_SYMBOLand 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_modulesand an entry in feature-removal-schedule.txt with the target date April 2006.
Quoted 6 lines
Quoted 4 lines
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?
Quoted 9 lines
Quoted 1 line
Do you understand why I distrust your "to aid later decision-making"?
You'll cope.
Quoted 2 lines
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
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 8 lines · Adrian Bunk
Quoted 7 lines · Andrew Morton
Quoted 4 lines · On Thu, 29 Jun 2006 21:58:28 +0200 Adrian Bunk <[email protected]> wrote:
Quoted 3 lines · Andrew Morton
On Thu, 29 Jun 2006 12:36:08 -0700
Andrew Morton <[email protected]> wrote:
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines · On Thu, 29 Jun 2006 21:19:40 +0200 Adrian Bunk <[email protected]> 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