Skip to contentSkip to conversation

kill include/linux/platform.h, default_idle() cleanup

PATCH In review Adrian Bunk 3 participants 3 messages Jan 28, 2006 – Feb 3, 2006

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kill include/linux/platform.h, default_idle() cleanup

include/linux/platform.h contained nothing that was actually used except the default_idle() prototype, and is therefore removed by this patch.

This patch does the following with the platform specific default_idle() functions on different architectures:
- remove the unused function:
- parisc
- sparc64
- make the needlessly global function static:
- arm
- h8300
- m68k
- m68knommu
- s390
- v850
- x86_64
- add a prototype in asm/system.h:
- cris
- i386
- ia64

---

 arch/arm/kernel/process.c       |    2 -
 arch/cris/kernel/process.c      |    3 --
 arch/h8300/kernel/process.c     |    4 +-
 arch/i386/kernel/apm.c          |    2 -
 arch/i386/mach-visws/reboot.c   |    1 
 arch/ia64/kernel/setup.c        |    1 
 arch/m68k/kernel/process.c      |    2 -
 arch/m68knommu/kernel/process.c |    2 -
 arch/parisc/kernel/process.c    |    5 ---
 arch/s390/kernel/process.c      |    2 -
 arch/sh/kernel/process.c        |    1 
 arch/sparc64/kernel/process.c   |    7 -----
 arch/v850/kernel/process.c      |    2 -
 arch/x86_64/kernel/process.c    |    2 -
 include/asm-cris/system.h       |    2 +
 include/asm-i386/system.h       |    2 +
 include/asm-ia64/system.h       |    2 +
 include/linux/platform.h        |   43 --------------------------------
 18 files changed, 15 insertions(+), 70 deletions(-)
arch/arm/kernel/process.c renamed from arch/arm/kernel/process.c.old +1 -1
@@ -83,7 +83,7 @@
  * This is our default idle handler.  We need to disable
  * interrupts here to ensure we don't miss a wakeup call.
  */
-void default_idle(void)
+static void default_idle(void)
 {
 	if (hlt_counter)
 		cpu_relax();
include/asm-cris/system.h renamed from include/asm-cris/system.h.old +2 -0
@@ -71,4 +71,6 @@
 
 #define arch_align_stack(x) (x)
 
+void default_idle(void);
+
 #endif
arch/cris/kernel/process.c renamed from arch/cris/kernel/process.c.old +1 -2
@@ -116,6 +116,7 @@
 #include <asm/pgtable.h>
 #include <asm/uaccess.h>
 #include <asm/irq.h>
+#include <asm/system.h>
 #include <linux/module.h>
 #include <linux/spinlock.h>
 #include <linux/fs_struct.h>
@@ -194,8 +195,6 @@
  */
 void (*pm_idle)(void);
 
-extern void default_idle(void);
-
 /*
  * The idle thread. There's no useful work to be
  * done, so just try to conserve power and have a
arch/h8300/kernel/process.c renamed from arch/h8300/kernel/process.c.old +2 -2
@@ -51,7 +51,7 @@
  * The idle loop on an H8/300..
  */
 #if !defined(CONFIG_H8300H_SIM) && !defined(CONFIG_H8S_SIM)
-void default_idle(void)
+static void default_idle(void)
 {
 	local_irq_disable();
 	if (!need_resched()) {
@@ -62,7 +62,7 @@
 		local_irq_enable();
 }
 #else
-void default_idle(void)
+static void default_idle(void)
 {
 	cpu_relax();
 }
include/asm-i386/system.h renamed from include/asm-i386/system.h.old +2 -0
@@ -498,4 +498,6 @@
 
 extern unsigned long arch_align_stack(unsigned long sp);
 
+void default_idle(void);
+
 #endif
arch/i386/kernel/apm.c renamed from arch/i386/kernel/apm.c.old +0 -2
@@ -824,8 +824,6 @@
 
 static void (*original_pm_idle)(void);
 
-extern void default_idle(void);
-
 /**
  * apm_cpu_idle		-	cpu idling for APM capable Linux
  *
include/asm-ia64/system.h renamed from include/asm-ia64/system.h.old +2 -0
@@ -283,6 +283,8 @@
 
 #define arch_align_stack(x) (x)
 
+void default_idle(void);
+
 #endif /* __KERNEL__ */
 
 #endif /* __ASSEMBLY__ */
arch/m68k/kernel/process.c renamed from arch/m68k/kernel/process.c.old +1 -1
@@ -77,7 +77,7 @@
 /*
  * The idle loop on an m68k..
  */
-void default_idle(void)
+static void default_idle(void)
 {
 	if (!need_resched())
 #if defined(MACH_ATARI_ONLY) && !defined(CONFIG_HADES)
arch/m68knommu/kernel/process.c renamed from arch/m68knommu/kernel/process.c.old +1 -1
@@ -43,7 +43,7 @@
 /*
  * The idle loop on an m68knommu..
  */
-void default_idle(void)
+static void default_idle(void)
 {
 	local_irq_disable();
  	while (!need_resched()) {
arch/parisc/kernel/process.c renamed from arch/parisc/kernel/process.c.old +0 -5
@@ -54,11 +54,6 @@
 #include <asm/uaccess.h>
 #include <asm/unwind.h>
 
-void default_idle(void)
-{
-	barrier();
-}
-
 /*
  * The idle thread. There's no useful work to be
  * done, so just try to conserve power and have a
arch/s390/kernel/process.c renamed from arch/s390/kernel/process.c.old +1 -1
@@ -103,7 +103,7 @@
 /*
  * The idle loop on a S390...
  */
-void default_idle(void)
+static void default_idle(void)
 {
 	int cpu, rc;
 
arch/sparc64/kernel/process.c renamed from arch/sparc64/kernel/process.c.old +0 -7
@@ -48,13 +48,6 @@
 
 /* #define VERBOSE_SHOWREGS */
 
-/*
- * Nothing special yet...
- */
-void default_idle(void)
-{
-}
-
 #ifndef CONFIG_SMP
 
 /*
arch/v850/kernel/process.c renamed from arch/v850/kernel/process.c.old +1 -1
@@ -34,7 +34,7 @@
 
 
 /* The idle loop.  */
-void default_idle (void)
+static void default_idle (void)
 {
 	while (! need_resched ())
 		asm ("halt; nop; nop; nop; nop; nop" ::: "cc");
arch/x86_64/kernel/process.c renamed from arch/x86_64/kernel/process.c.old +1 -1
@@ -114,7 +114,7 @@
  * We use this if we don't have any better
  * idle routine..
  */
-void default_idle(void)
+static void default_idle(void)
 {
 	local_irq_enable();
 
arch/i386/mach-visws/reboot.c renamed from arch/i386/mach-visws/reboot.c.old +0 -1
@@ -1,7 +1,6 @@
 #include <linux/module.h>
 #include <linux/smp.h>
 #include <linux/delay.h>
-#include <linux/platform.h>
 
 #include <asm/io.h>
 #include "piix4.h"
arch/ia64/kernel/setup.c renamed from arch/ia64/kernel/setup.c.old +0 -1
@@ -41,7 +41,6 @@
 #include <linux/serial_core.h>
 #include <linux/efi.h>
 #include <linux/initrd.h>
-#include <linux/platform.h>
 #include <linux/pm.h>
 
 #include <asm/ia32.h>
arch/sh/kernel/process.c renamed from arch/sh/kernel/process.c.old +0 -1
@@ -18,7 +18,6 @@
 #include <linux/slab.h>
 #include <linux/a.out.h>
 #include <linux/ptrace.h>
-#include <linux/platform.h>
 #include <linux/kallsyms.h>
 
 #include <asm/io.h>
include/linux/platform.h deleted +0 -43

43 lines not on this page · raw message

#1 lore raw
Quoted 22 lines · Adrian Bunk

include/linux/platform.h contained nothing that was actually used except the default_idle() prototype, and is therefore removed by this patch.

This patch does the following with the platform specific default_idle() functions on different architectures:
- remove the unused function:
- parisc
- sparc64
- make the needlessly global function static:
- arm
- h8300
- m68k
- m68knommu
- s390
- v850
- x86_64
- add a prototype in asm/system.h:
- cris
- i386
- ia64

Quoted 1 line

ACK, please make it go away. :-)

Thanks,

Patrick