summaryrefslogtreecommitdiff
path: root/drivers/oprofile
diff options
context:
space:
mode:
authorJesper Juhl <juhl@dif.dk>2005-07-27 11:46:09 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-27 16:26:20 -0700
commit77933d7276ee8fa0e2947641941a6f7a100a327b (patch)
treee3a42724642410f5257c794a71b34642092eedd5 /drivers/oprofile
parent03e259a9cdbd0583e71468293aaa1ccadbdaeff1 (diff)
downloadlinux-3.10-77933d7276ee8fa0e2947641941a6f7a100a327b.tar.gz
linux-3.10-77933d7276ee8fa0e2947641941a6f7a100a327b.tar.bz2
linux-3.10-77933d7276ee8fa0e2947641941a6f7a100a327b.zip
[PATCH] clean up inline static vs static inline
`gcc -W' likes to complain if the static keyword is not at the beginning of the declaration. This patch fixes all remaining occurrences of "inline static" up with "static inline" in the entire kernel tree (140 occurrences in 47 files). While making this change I came across a few lines with trailing whitespace that I also fixed up, I have also added or removed a blank line or two here and there, but there are no functional changes in the patch. Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/oprofile')
-rw-r--r--drivers/oprofile/cpu_buffer.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/drivers/oprofile/cpu_buffer.c b/drivers/oprofile/cpu_buffer.c
index e9b1772a3a2..026f671ea55 100644
--- a/drivers/oprofile/cpu_buffer.c
+++ b/drivers/oprofile/cpu_buffer.c
@@ -42,8 +42,7 @@ void free_cpu_buffers(void)
vfree(cpu_buffer[i].buffer);
}
}
-
-
+
int alloc_cpu_buffers(void)
{
int i;
@@ -74,7 +73,6 @@ fail:
free_cpu_buffers();
return -ENOMEM;
}
-
void start_cpu_work(void)
{
@@ -93,7 +91,6 @@ void start_cpu_work(void)
}
}
-
void end_cpu_work(void)
{
int i;
@@ -109,7 +106,6 @@ void end_cpu_work(void)
flush_scheduled_work();
}
-
/* Resets the cpu buffer to a sane state. */
void cpu_buffer_reset(struct oprofile_cpu_buffer * cpu_buf)
{
@@ -121,7 +117,6 @@ void cpu_buffer_reset(struct oprofile_cpu_buffer * cpu_buf)
cpu_buf->last_task = NULL;
}
-
/* compute number of available slots in cpu_buffer queue */
static unsigned long nr_available_slots(struct oprofile_cpu_buffer const * b)
{
@@ -134,7 +129,6 @@ static unsigned long nr_available_slots(struct oprofile_cpu_buffer const * b)
return tail + (b->buffer_size - head) - 1;
}
-
static void increment_head(struct oprofile_cpu_buffer * b)
{
unsigned long new_head = b->head_pos + 1;
@@ -149,10 +143,7 @@ static void increment_head(struct oprofile_cpu_buffer * b)
b->head_pos = 0;
}
-
-
-
-inline static void
+static inline void
add_sample(struct oprofile_cpu_buffer * cpu_buf,
unsigned long pc, unsigned long event)
{
@@ -162,14 +153,12 @@ add_sample(struct oprofile_cpu_buffer * cpu_buf,
increment_head(cpu_buf);
}
-
-inline static void
+static inline void
add_code(struct oprofile_cpu_buffer * buffer, unsigned long value)
{
add_sample(buffer, ESCAPE_CODE, value);
}
-
/* This must be safe from any context. It's safe writing here
* because of the head/tail separation of the writer and reader
* of the CPU buffer.
@@ -223,13 +212,11 @@ static int oprofile_begin_trace(struct oprofile_cpu_buffer * cpu_buf)
return 1;
}
-
static void oprofile_end_trace(struct oprofile_cpu_buffer * cpu_buf)
{
cpu_buf->tracing = 0;
}
-
void oprofile_add_sample(struct pt_regs * const regs, unsigned long event)
{
struct oprofile_cpu_buffer * cpu_buf = &cpu_buffer[smp_processor_id()];
@@ -251,14 +238,12 @@ void oprofile_add_sample(struct pt_regs * const regs, unsigned long event)
oprofile_end_trace(cpu_buf);
}
-
void oprofile_add_pc(unsigned long pc, int is_kernel, unsigned long event)
{
struct oprofile_cpu_buffer * cpu_buf = &cpu_buffer[smp_processor_id()];
log_sample(cpu_buf, pc, is_kernel, event);
}
-
void oprofile_add_trace(unsigned long pc)
{
struct oprofile_cpu_buffer * cpu_buf = &cpu_buffer[smp_processor_id()];
@@ -283,8 +268,6 @@ void oprofile_add_trace(unsigned long pc)
add_sample(cpu_buf, pc, 0);
}
-
-
/*
* This serves to avoid cpu buffer overflow, and makes sure
* the task mortuary progresses