Skip to contentSkip to conversation

kernel/: small cleanups

PATCH In review Adrian Bunk 2 participants 2 messages Oct 30, 2005

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

PATCH 1/1 kernel/: small cleanups

This patch contains the following cleanups:
- make needlessly global functions static
- every file should include the headers containing the prototypes for it's global functions

---

 kernel/audit.c      |    2 +-
 kernel/irq/proc.c   |    2 ++
 kernel/rcutorture.c |    2 +-
 kernel/timer.c      |    1 +
 4 files changed, 5 insertions(+), 2 deletions(-)
kernel/timer.c renamed from kernel/timer.c.old +1 -0
@@ -33,6 +33,7 @@
 #include <linux/posix-timers.h>
 #include <linux/cpu.h>
 #include <linux/syscalls.h>
+#include <linux/delay.h>
 
 #include <asm/uaccess.h>
 #include <asm/unistd.h>
kernel/irq/proc.c renamed from kernel/irq/proc.c.old +2 -0
@@ -10,6 +10,8 @@
 #include <linux/proc_fs.h>
 #include <linux/interrupt.h>
 
+#include "internals.h"
+
 static struct proc_dir_entry *root_irq_dir, *irq_dir[NR_IRQS];
 
 #ifdef CONFIG_SMP
kernel/audit.c renamed from kernel/audit.c.old +1 -1
@@ -272,7 +272,7 @@
 	return old;
 }
 
-int kauditd_thread(void *dummy)
+static int kauditd_thread(void *dummy)
 {
 	struct sk_buff *skb;
 
kernel/rcutorture.c renamed from kernel/rcutorture.c.old +1 -1
@@ -99,7 +99,7 @@
 /*
  * Allocate an element from the rcu_tortures pool.
  */
-struct rcu_torture *
+static struct rcu_torture *
 rcu_torture_alloc(void)
 {
 	struct list_head *p;
Acked-by on v1 1/1
#1 lore raw
Quoted 2 lines · Adrian Bunk

This patch contains the following cleanups:
- make needlessly global functions static

Good catch on rcu_torture_alloc()!

Thanx, Paul

Quoted 2 lines

- every file should include the headers containing the prototypes for it's global functions

Quoted 55 lines

---

 kernel/audit.c      |    2 +-
 kernel/irq/proc.c   |    2 ++
 kernel/rcutorture.c |    2 +-
 kernel/timer.c      |    1 +
 4 files changed, 5 insertions(+), 2 deletions(-)
kernel/timer.c renamed from kernel/timer.c.old +1 -0
@@ -33,6 +33,7 @@
 #include <linux/posix-timers.h>
 #include <linux/cpu.h>
 #include <linux/syscalls.h>
+#include <linux/delay.h>
 
 #include <asm/uaccess.h>
 #include <asm/unistd.h>
kernel/irq/proc.c renamed from kernel/irq/proc.c.old +2 -0
@@ -10,6 +10,8 @@
 #include <linux/proc_fs.h>
 #include <linux/interrupt.h>
 
+#include "internals.h"
+
 static struct proc_dir_entry *root_irq_dir, *irq_dir[NR_IRQS];
 
 #ifdef CONFIG_SMP
kernel/audit.c renamed from kernel/audit.c.old +1 -1
@@ -272,7 +272,7 @@
 	return old;
 }
 
-int kauditd_thread(void *dummy)
+static int kauditd_thread(void *dummy)
 {
 	struct sk_buff *skb;
 
kernel/rcutorture.c renamed from kernel/rcutorture.c.old +1 -1
@@ -99,7 +99,7 @@
 /*
  * Allocate an element from the rcu_tortures pool.
  */
-struct rcu_torture *
+static struct rcu_torture *
 rcu_torture_alloc(void)
 {
 	struct list_head *p;