* [2.6 patch] oprofile: make some code static
@ 2005-02-18 23:48 Adrian Bunk
0 siblings, 0 replies; 2+ messages in thread
From: Adrian Bunk @ 2005-02-18 23:48 UTC (permalink / raw)
To: phil.el; +Cc: oprofile-list, linux-kernel
This patch makes some needlessly global code static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
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.000000000 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/oprofile/buffer_sync.c 2005-02-17 22:19:25.000000000 +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.000000000 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/oprofile/cpu_buffer.c 2005-02-17 22:20:10.000000000 +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.000000000 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/oprofile/event_buffer.c 2005-02-17 22:21:38.000000000 +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);
^ permalink raw reply [flat|nested] 2+ messages in thread* [2.6 patch] oprofile: make some code static
@ 2005-03-11 18:16 Adrian Bunk
0 siblings, 0 replies; 2+ messages in thread
From: Adrian Bunk @ 2005-03-11 18:16 UTC (permalink / raw)
To: Andrew Morton; +Cc: phil.el, oprofile-list, linux-kernel
This patch makes some needlessly global code static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
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.000000000 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/oprofile/buffer_sync.c 2005-02-17 22:19:25.000000000 +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.000000000 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/oprofile/cpu_buffer.c 2005-02-17 22:20:10.000000000 +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.000000000 +0100
+++ linux-2.6.11-rc3-mm2-full/drivers/oprofile/event_buffer.c 2005-02-17 22:21:38.000000000 +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);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-03-11 18:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-18 23:48 [2.6 patch] oprofile: make some code static Adrian Bunk
-- strict thread matches above, loose matches on Subject: below --
2005-03-11 18:16 Adrian Bunk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox