[2.6 patch] oprofile: make some code static

2005-03-11 Thread Adrian Bunk
This patch makes some needlessly global code static.

Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>

---

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(-)

--- linux-2.6.11-rc3-mm2-full/drivers/oprofile/buffer_sync.c.old
2005-02-17 22:18:31.0 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/oprofile/buffer_sync.c2005-02-17 
22:19:25.0 +0100
@@ -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;
--- linux-2.6.11-rc3-mm2-full/drivers/oprofile/cpu_buffer.c.old 2005-02-17 
22:20:01.0 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/oprofile/cpu_buffer.c 2005-02-17 
22:20:10.0 +0100
@@ -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)
 {
--- linux-2.6.11-rc3-mm2-full/drivers/oprofile/event_buffer.c.old   
2005-02-17 22:20:45.0 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/oprofile/event_buffer.c   2005-02-17 
22:21:38.0 +0100
@@ -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);


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[2.6 patch] oprofile: make some code static

2005-02-18 Thread Adrian Bunk
This patch makes some needlessly global code static.

Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>

---

 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(-)

--- linux-2.6.11-rc3-mm2-full/drivers/oprofile/buffer_sync.c.old
2005-02-17 22:18:31.0 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/oprofile/buffer_sync.c2005-02-17 
22:19:25.0 +0100
@@ -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;
--- linux-2.6.11-rc3-mm2-full/drivers/oprofile/cpu_buffer.c.old 2005-02-17 
22:20:01.0 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/oprofile/cpu_buffer.c 2005-02-17 
22:20:10.0 +0100
@@ -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)
 {
--- linux-2.6.11-rc3-mm2-full/drivers/oprofile/event_buffer.c.old   
2005-02-17 22:20:45.0 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/oprofile/event_buffer.c   2005-02-17 
22:21:38.0 +0100
@@ -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);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/