Skip to contentSkip to conversation

oprofile: make some code static

PATCH New Adrian Bunk 1 participant 1 message Mar 11, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 oprofile: make some code static

This patch makes some needlessly global code static.

---

This patch was already sent on:
- 19 Feb 2005

 drivers/oprofile/buffer_sync.c  |    6 +++---
 drivers/oprofile/cpu_buffer.c   |    2 +-
 drivers/oprofile/event_buffer.c |    7 ++++---
 3 files changed, 8 insertions(+), 7 deletions(-)
drivers/oprofile/buffer_sync.c renamed from drivers/oprofile/buffer_sync.c.old +3 -3
@@ -34,9 +34,9 @@
  
 static LIST_HEAD(dying_tasks);
 static LIST_HEAD(dead_tasks);
-cpumask_t marked_cpus = CPU_MASK_NONE;
+static cpumask_t marked_cpus = CPU_MASK_NONE;
 static DEFINE_SPINLOCK(task_mortuary);
-void process_task_mortuary(void);
+static void process_task_mortuary(void);
 
 
 /* Take ownership of the task struct and place it on the
@@ -422,7 +422,7 @@
  * and to have reached the list, it must have gone through
  * one full sync already.
  */
-void process_task_mortuary(void)
+static void process_task_mortuary(void)
 {
 	struct list_head * pos;
 	struct list_head * pos2;
drivers/oprofile/cpu_buffer.c renamed from drivers/oprofile/cpu_buffer.c.old +1 -1
@@ -32,7 +32,7 @@
 static void wq_sync_buffer(void *);
 
 #define DEFAULT_TIMER_EXPIRE (HZ / 10)
-int work_enabled;
+static int work_enabled;
 
 void free_cpu_buffers(void)
 {
drivers/oprofile/event_buffer.c renamed from drivers/oprofile/event_buffer.c.old +4 -3
@@ -94,7 +94,7 @@
 }
 
  
-int event_buffer_open(struct inode * inode, struct file * file)
+static int event_buffer_open(struct inode * inode, struct file * file)
 {
 	int err = -EPERM;
 
@@ -130,7 +130,7 @@
 }
 
 
-int event_buffer_release(struct inode * inode, struct file * file)
+static int event_buffer_release(struct inode * inode, struct file * file)
 {
 	oprofile_stop();
 	oprofile_shutdown();
@@ -142,7 +142,8 @@
 }
 
 
-ssize_t event_buffer_read(struct file * file, char __user * buf, size_t count, loff_t * offset)
+static ssize_t event_buffer_read(struct file * file, char __user * buf,
+				 size_t count, loff_t * offset)
 {
 	int retval = -EINVAL;
 	size_t const max = buffer_size * sizeof(unsigned long);