diff options
author | Robert Richter <robert.richter@amd.com> | 2008-09-05 11:12:36 -0400 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2008-10-15 14:55:51 -0400 |
commit | 25ad2913cae9c9e3ed28075caeb2eefccd636f4f (patch) | |
tree | dc0cc534beb4ccf487f9f6f3c7382bc559f0a35d | |
parent | c92960fccb9f32a1d6110f6dcfe483ed96c62beb (diff) |
oprofile: more whitespace fixes
Signed-off-by: Robert Richter <robert.richter@amd.com>
-rw-r--r-- | arch/alpha/oprofile/common.c | 2 | ||||
-rw-r--r-- | arch/ia64/oprofile/init.c | 4 | ||||
-rw-r--r-- | arch/ia64/oprofile/perfmon.c | 4 | ||||
-rw-r--r-- | arch/m32r/oprofile/init.c | 2 | ||||
-rw-r--r-- | arch/mips/oprofile/common.c | 2 | ||||
-rw-r--r-- | arch/mips/oprofile/op_impl.h | 2 | ||||
-rw-r--r-- | arch/mips/oprofile/op_model_rm9000.c | 2 | ||||
-rw-r--r-- | arch/parisc/oprofile/init.c | 2 | ||||
-rw-r--r-- | arch/powerpc/oprofile/op_model_cell.c | 2 | ||||
-rw-r--r-- | arch/sparc/oprofile/init.c | 2 | ||||
-rw-r--r-- | arch/sparc64/oprofile/init.c | 2 | ||||
-rw-r--r-- | arch/x86/oprofile/backtrace.c | 2 | ||||
-rw-r--r-- | arch/x86/oprofile/op_model_amd.c | 6 | ||||
-rw-r--r-- | arch/x86/oprofile/op_x86_model.h | 4 | ||||
-rw-r--r-- | drivers/oprofile/cpu_buffer.c | 22 | ||||
-rw-r--r-- | drivers/oprofile/cpu_buffer.h | 6 | ||||
-rw-r--r-- | drivers/oprofile/event_buffer.c | 10 | ||||
-rw-r--r-- | drivers/oprofile/oprof.h | 4 | ||||
-rw-r--r-- | drivers/oprofile/oprofile_files.c | 16 | ||||
-rw-r--r-- | drivers/oprofile/oprofile_stats.c | 10 | ||||
-rw-r--r-- | drivers/oprofile/oprofile_stats.h | 2 | ||||
-rw-r--r-- | drivers/oprofile/oprofilefs.c | 72 | ||||
-rw-r--r-- | drivers/oprofile/timer_int.c | 2 |
23 files changed, 91 insertions, 91 deletions
diff --git a/arch/alpha/oprofile/common.c b/arch/alpha/oprofile/common.c index 7c3d5ec6ec67..bd8ac533a504 100644 --- a/arch/alpha/oprofile/common.c +++ b/arch/alpha/oprofile/common.c | |||
@@ -106,7 +106,7 @@ op_axp_stop(void) | |||
106 | } | 106 | } |
107 | 107 | ||
108 | static int | 108 | static int |
109 | op_axp_create_files(struct super_block * sb, struct dentry * root) | 109 | op_axp_create_files(struct super_block *sb, struct dentry *root) |
110 | { | 110 | { |
111 | int i; | 111 | int i; |
112 | 112 | ||
diff --git a/arch/ia64/oprofile/init.c b/arch/ia64/oprofile/init.c index 125a602a660d..31b545c35460 100644 --- a/arch/ia64/oprofile/init.c +++ b/arch/ia64/oprofile/init.c | |||
@@ -12,11 +12,11 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | 14 | ||
15 | extern int perfmon_init(struct oprofile_operations * ops); | 15 | extern int perfmon_init(struct oprofile_operations *ops); |
16 | extern void perfmon_exit(void); | 16 | extern void perfmon_exit(void); |
17 | extern void ia64_backtrace(struct pt_regs * const regs, unsigned int depth); | 17 | extern void ia64_backtrace(struct pt_regs * const regs, unsigned int depth); |
18 | 18 | ||
19 | int __init oprofile_arch_init(struct oprofile_operations * ops) | 19 | int __init oprofile_arch_init(struct oprofile_operations *ops) |
20 | { | 20 | { |
21 | int ret = -ENODEV; | 21 | int ret = -ENODEV; |
22 | 22 | ||
diff --git a/arch/ia64/oprofile/perfmon.c b/arch/ia64/oprofile/perfmon.c index bc41dd32fec6..192d3e8e1f65 100644 --- a/arch/ia64/oprofile/perfmon.c +++ b/arch/ia64/oprofile/perfmon.c | |||
@@ -56,7 +56,7 @@ static pfm_buffer_fmt_t oprofile_fmt = { | |||
56 | }; | 56 | }; |
57 | 57 | ||
58 | 58 | ||
59 | static char * get_cpu_type(void) | 59 | static char *get_cpu_type(void) |
60 | { | 60 | { |
61 | __u8 family = local_cpu_data->family; | 61 | __u8 family = local_cpu_data->family; |
62 | 62 | ||
@@ -75,7 +75,7 @@ static char * get_cpu_type(void) | |||
75 | 75 | ||
76 | static int using_perfmon; | 76 | static int using_perfmon; |
77 | 77 | ||
78 | int perfmon_init(struct oprofile_operations * ops) | 78 | int perfmon_init(struct oprofile_operations *ops) |
79 | { | 79 | { |
80 | int ret = pfm_register_buffer_fmt(&oprofile_fmt); | 80 | int ret = pfm_register_buffer_fmt(&oprofile_fmt); |
81 | if (ret) | 81 | if (ret) |
diff --git a/arch/m32r/oprofile/init.c b/arch/m32r/oprofile/init.c index b7773e45c43f..fa56860f4258 100644 --- a/arch/m32r/oprofile/init.c +++ b/arch/m32r/oprofile/init.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | 14 | ||
15 | int __init oprofile_arch_init(struct oprofile_operations * ops) | 15 | int __init oprofile_arch_init(struct oprofile_operations *ops) |
16 | { | 16 | { |
17 | return -ENODEV; | 17 | return -ENODEV; |
18 | } | 18 | } |
diff --git a/arch/mips/oprofile/common.c b/arch/mips/oprofile/common.c index dd2fbd6645c1..3bf3354547f6 100644 --- a/arch/mips/oprofile/common.c +++ b/arch/mips/oprofile/common.c | |||
@@ -32,7 +32,7 @@ static int op_mips_setup(void) | |||
32 | return 0; | 32 | return 0; |
33 | } | 33 | } |
34 | 34 | ||
35 | static int op_mips_create_files(struct super_block * sb, struct dentry * root) | 35 | static int op_mips_create_files(struct super_block *sb, struct dentry *root) |
36 | { | 36 | { |
37 | int i; | 37 | int i; |
38 | 38 | ||
diff --git a/arch/mips/oprofile/op_impl.h b/arch/mips/oprofile/op_impl.h index 2bfc17c30106..f04b54fb37d1 100644 --- a/arch/mips/oprofile/op_impl.h +++ b/arch/mips/oprofile/op_impl.h | |||
@@ -27,7 +27,7 @@ struct op_counter_config { | |||
27 | /* Per-architecture configury and hooks. */ | 27 | /* Per-architecture configury and hooks. */ |
28 | struct op_mips_model { | 28 | struct op_mips_model { |
29 | void (*reg_setup) (struct op_counter_config *); | 29 | void (*reg_setup) (struct op_counter_config *); |
30 | void (*cpu_setup) (void * dummy); | 30 | void (*cpu_setup) (void *dummy); |
31 | int (*init)(void); | 31 | int (*init)(void); |
32 | void (*exit)(void); | 32 | void (*exit)(void); |
33 | void (*cpu_start)(void *args); | 33 | void (*cpu_start)(void *args); |
diff --git a/arch/mips/oprofile/op_model_rm9000.c b/arch/mips/oprofile/op_model_rm9000.c index a45d3202894f..3aa81384966d 100644 --- a/arch/mips/oprofile/op_model_rm9000.c +++ b/arch/mips/oprofile/op_model_rm9000.c | |||
@@ -80,7 +80,7 @@ static void rm9000_cpu_stop(void *args) | |||
80 | write_c0_perfcontrol(0); | 80 | write_c0_perfcontrol(0); |
81 | } | 81 | } |
82 | 82 | ||
83 | static irqreturn_t rm9000_perfcount_handler(int irq, void * dev_id) | 83 | static irqreturn_t rm9000_perfcount_handler(int irq, void *dev_id) |
84 | { | 84 | { |
85 | unsigned int control = read_c0_perfcontrol(); | 85 | unsigned int control = read_c0_perfcontrol(); |
86 | struct pt_regs *regs = get_irq_regs(); | 86 | struct pt_regs *regs = get_irq_regs(); |
diff --git a/arch/parisc/oprofile/init.c b/arch/parisc/oprofile/init.c index 113f5139f551..026cba2af07a 100644 --- a/arch/parisc/oprofile/init.c +++ b/arch/parisc/oprofile/init.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/oprofile.h> | 13 | #include <linux/oprofile.h> |
14 | 14 | ||
15 | int __init oprofile_arch_init(struct oprofile_operations * ops) | 15 | int __init oprofile_arch_init(struct oprofile_operations *ops) |
16 | { | 16 | { |
17 | return -ENODEV; | 17 | return -ENODEV; |
18 | } | 18 | } |
diff --git a/arch/powerpc/oprofile/op_model_cell.c b/arch/powerpc/oprofile/op_model_cell.c index 5ff4de3eb3be..35141a8bc3d9 100644 --- a/arch/powerpc/oprofile/op_model_cell.c +++ b/arch/powerpc/oprofile/op_model_cell.c | |||
@@ -404,7 +404,7 @@ set_count_mode(u32 kernel, u32 user) | |||
404 | } | 404 | } |
405 | } | 405 | } |
406 | 406 | ||
407 | static inline void enable_ctr(u32 cpu, u32 ctr, u32 * pm07_cntrl) | 407 | static inline void enable_ctr(u32 cpu, u32 ctr, u32 *pm07_cntrl) |
408 | { | 408 | { |
409 | 409 | ||
410 | pm07_cntrl[ctr] |= CBE_PM_CTR_ENABLE; | 410 | pm07_cntrl[ctr] |= CBE_PM_CTR_ENABLE; |
diff --git a/arch/sparc/oprofile/init.c b/arch/sparc/oprofile/init.c index 9ab815b95b5a..17bb6035069b 100644 --- a/arch/sparc/oprofile/init.c +++ b/arch/sparc/oprofile/init.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | 14 | ||
15 | int __init oprofile_arch_init(struct oprofile_operations * ops) | 15 | int __init oprofile_arch_init(struct oprofile_operations *ops) |
16 | { | 16 | { |
17 | return -ENODEV; | 17 | return -ENODEV; |
18 | } | 18 | } |
diff --git a/arch/sparc64/oprofile/init.c b/arch/sparc64/oprofile/init.c index 9ab815b95b5a..17bb6035069b 100644 --- a/arch/sparc64/oprofile/init.c +++ b/arch/sparc64/oprofile/init.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | 14 | ||
15 | int __init oprofile_arch_init(struct oprofile_operations * ops) | 15 | int __init oprofile_arch_init(struct oprofile_operations *ops) |
16 | { | 16 | { |
17 | return -ENODEV; | 17 | return -ENODEV; |
18 | } | 18 | } |
diff --git a/arch/x86/oprofile/backtrace.c b/arch/x86/oprofile/backtrace.c index e2095cba409f..36e324139f77 100644 --- a/arch/x86/oprofile/backtrace.c +++ b/arch/x86/oprofile/backtrace.c | |||
@@ -53,7 +53,7 @@ struct frame_head { | |||
53 | } __attribute__((packed)); | 53 | } __attribute__((packed)); |
54 | 54 | ||
55 | static struct frame_head * | 55 | static struct frame_head * |
56 | dump_user_backtrace(struct frame_head * head) | 56 | dump_user_backtrace(struct frame_head *head) |
57 | { | 57 | { |
58 | struct frame_head bufhead[2]; | 58 | struct frame_head bufhead[2]; |
59 | 59 | ||
diff --git a/arch/x86/oprofile/op_model_amd.c b/arch/x86/oprofile/op_model_amd.c index b9a810b33261..a2e83afbe3e1 100644 --- a/arch/x86/oprofile/op_model_amd.c +++ b/arch/x86/oprofile/op_model_amd.c | |||
@@ -69,7 +69,7 @@ static unsigned long reset_value[NUM_COUNTERS]; | |||
69 | data. Should then be added to linux/oprofile.h. */ | 69 | data. Should then be added to linux/oprofile.h. */ |
70 | extern void | 70 | extern void |
71 | oprofile_add_ibs_sample(struct pt_regs *const regs, | 71 | oprofile_add_ibs_sample(struct pt_regs *const regs, |
72 | unsigned int * const ibs_sample, int ibs_code); | 72 | unsigned int *const ibs_sample, int ibs_code); |
73 | 73 | ||
74 | struct ibs_fetch_sample { | 74 | struct ibs_fetch_sample { |
75 | /* MSRC001_1031 IBS Fetch Linear Address Register */ | 75 | /* MSRC001_1031 IBS Fetch Linear Address Register */ |
@@ -469,9 +469,9 @@ static void clear_ibs_nmi(void) | |||
469 | on_each_cpu(apic_clear_ibs_nmi_per_cpu, NULL, 1); | 469 | on_each_cpu(apic_clear_ibs_nmi_per_cpu, NULL, 1); |
470 | } | 470 | } |
471 | 471 | ||
472 | static int (*create_arch_files)(struct super_block * sb, struct dentry * root); | 472 | static int (*create_arch_files)(struct super_block *sb, struct dentry *root); |
473 | 473 | ||
474 | static int setup_ibs_files(struct super_block * sb, struct dentry * root) | 474 | static int setup_ibs_files(struct super_block *sb, struct dentry *root) |
475 | { | 475 | { |
476 | struct dentry *dir; | 476 | struct dentry *dir; |
477 | int ret = 0; | 477 | int ret = 0; |
diff --git a/arch/x86/oprofile/op_x86_model.h b/arch/x86/oprofile/op_x86_model.h index 05a0261ba0c3..24ccdebf3ac1 100644 --- a/arch/x86/oprofile/op_x86_model.h +++ b/arch/x86/oprofile/op_x86_model.h | |||
@@ -22,8 +22,8 @@ struct op_msr { | |||
22 | }; | 22 | }; |
23 | 23 | ||
24 | struct op_msrs { | 24 | struct op_msrs { |
25 | struct op_msr * counters; | 25 | struct op_msr *counters; |
26 | struct op_msr * controls; | 26 | struct op_msr *controls; |
27 | }; | 27 | }; |
28 | 28 | ||
29 | struct pt_regs; | 29 | struct pt_regs; |
diff --git a/drivers/oprofile/cpu_buffer.c b/drivers/oprofile/cpu_buffer.c index d6c68270b3da..b47ce038490f 100644 --- a/drivers/oprofile/cpu_buffer.c +++ b/drivers/oprofile/cpu_buffer.c | |||
@@ -112,7 +112,7 @@ void end_cpu_work(void) | |||
112 | } | 112 | } |
113 | 113 | ||
114 | /* Resets the cpu buffer to a sane state. */ | 114 | /* Resets the cpu buffer to a sane state. */ |
115 | void cpu_buffer_reset(struct oprofile_cpu_buffer * cpu_buf) | 115 | void cpu_buffer_reset(struct oprofile_cpu_buffer *cpu_buf) |
116 | { | 116 | { |
117 | /* reset these to invalid values; the next sample | 117 | /* reset these to invalid values; the next sample |
118 | * collected will populate the buffer with proper | 118 | * collected will populate the buffer with proper |
@@ -123,7 +123,7 @@ void cpu_buffer_reset(struct oprofile_cpu_buffer * cpu_buf) | |||
123 | } | 123 | } |
124 | 124 | ||
125 | /* compute number of available slots in cpu_buffer queue */ | 125 | /* compute number of available slots in cpu_buffer queue */ |
126 | static unsigned long nr_available_slots(struct oprofile_cpu_buffer const * b) | 126 | static unsigned long nr_available_slots(struct oprofile_cpu_buffer const *b) |
127 | { | 127 | { |
128 | unsigned long head = b->head_pos; | 128 | unsigned long head = b->head_pos; |
129 | unsigned long tail = b->tail_pos; | 129 | unsigned long tail = b->tail_pos; |
@@ -134,7 +134,7 @@ static unsigned long nr_available_slots(struct oprofile_cpu_buffer const * b) | |||
134 | return tail + (b->buffer_size - head) - 1; | 134 | return tail + (b->buffer_size - head) - 1; |
135 | } | 135 | } |
136 | 136 | ||
137 | static void increment_head(struct oprofile_cpu_buffer * b) | 137 | static void increment_head(struct oprofile_cpu_buffer *b) |
138 | { | 138 | { |
139 | unsigned long new_head = b->head_pos + 1; | 139 | unsigned long new_head = b->head_pos + 1; |
140 | 140 | ||
@@ -149,17 +149,17 @@ static void increment_head(struct oprofile_cpu_buffer * b) | |||
149 | } | 149 | } |
150 | 150 | ||
151 | static inline void | 151 | static inline void |
152 | add_sample(struct oprofile_cpu_buffer * cpu_buf, | 152 | add_sample(struct oprofile_cpu_buffer *cpu_buf, |
153 | unsigned long pc, unsigned long event) | 153 | unsigned long pc, unsigned long event) |
154 | { | 154 | { |
155 | struct op_sample * entry = &cpu_buf->buffer[cpu_buf->head_pos]; | 155 | struct op_sample *entry = &cpu_buf->buffer[cpu_buf->head_pos]; |
156 | entry->eip = pc; | 156 | entry->eip = pc; |
157 | entry->event = event; | 157 | entry->event = event; |
158 | increment_head(cpu_buf); | 158 | increment_head(cpu_buf); |
159 | } | 159 | } |
160 | 160 | ||
161 | static inline void | 161 | static inline void |
162 | add_code(struct oprofile_cpu_buffer * buffer, unsigned long value) | 162 | add_code(struct oprofile_cpu_buffer *buffer, unsigned long value) |
163 | { | 163 | { |
164 | add_sample(buffer, ESCAPE_CODE, value); | 164 | add_sample(buffer, ESCAPE_CODE, value); |
165 | } | 165 | } |
@@ -173,10 +173,10 @@ add_code(struct oprofile_cpu_buffer * buffer, unsigned long value) | |||
173 | * pc. We tag this in the buffer by generating kernel enter/exit | 173 | * pc. We tag this in the buffer by generating kernel enter/exit |
174 | * events whenever is_kernel changes | 174 | * events whenever is_kernel changes |
175 | */ | 175 | */ |
176 | static int log_sample(struct oprofile_cpu_buffer * cpu_buf, unsigned long pc, | 176 | static int log_sample(struct oprofile_cpu_buffer *cpu_buf, unsigned long pc, |
177 | int is_kernel, unsigned long event) | 177 | int is_kernel, unsigned long event) |
178 | { | 178 | { |
179 | struct task_struct * task; | 179 | struct task_struct *task; |
180 | 180 | ||
181 | cpu_buf->sample_received++; | 181 | cpu_buf->sample_received++; |
182 | 182 | ||
@@ -222,7 +222,7 @@ static int oprofile_begin_trace(struct oprofile_cpu_buffer *cpu_buf) | |||
222 | return 1; | 222 | return 1; |
223 | } | 223 | } |
224 | 224 | ||
225 | static void oprofile_end_trace(struct oprofile_cpu_buffer * cpu_buf) | 225 | static void oprofile_end_trace(struct oprofile_cpu_buffer *cpu_buf) |
226 | { | 226 | { |
227 | cpu_buf->tracing = 0; | 227 | cpu_buf->tracing = 0; |
228 | } | 228 | } |
@@ -260,7 +260,7 @@ void oprofile_add_sample(struct pt_regs * const regs, unsigned long event) | |||
260 | #define MAX_IBS_SAMPLE_SIZE 14 | 260 | #define MAX_IBS_SAMPLE_SIZE 14 |
261 | 261 | ||
262 | void oprofile_add_ibs_sample(struct pt_regs *const regs, | 262 | void oprofile_add_ibs_sample(struct pt_regs *const regs, |
263 | unsigned int * const ibs_sample, int ibs_code) | 263 | unsigned int *const ibs_sample, int ibs_code) |
264 | { | 264 | { |
265 | int is_kernel = !user_mode(regs); | 265 | int is_kernel = !user_mode(regs); |
266 | struct oprofile_cpu_buffer *cpu_buf = &__get_cpu_var(cpu_buffer); | 266 | struct oprofile_cpu_buffer *cpu_buf = &__get_cpu_var(cpu_buffer); |
@@ -345,7 +345,7 @@ void oprofile_add_trace(unsigned long pc) | |||
345 | */ | 345 | */ |
346 | static void wq_sync_buffer(struct work_struct *work) | 346 | static void wq_sync_buffer(struct work_struct *work) |
347 | { | 347 | { |
348 | struct oprofile_cpu_buffer * b = | 348 | struct oprofile_cpu_buffer *b = |
349 | container_of(work, struct oprofile_cpu_buffer, work.work); | 349 | container_of(work, struct oprofile_cpu_buffer, work.work); |
350 | if (b->cpu != smp_processor_id()) { | 350 | if (b->cpu != smp_processor_id()) { |
351 | printk(KERN_DEBUG "WQ on CPU%d, prefer CPU%d\n", | 351 | printk(KERN_DEBUG "WQ on CPU%d, prefer CPU%d\n", |
diff --git a/drivers/oprofile/cpu_buffer.h b/drivers/oprofile/cpu_buffer.h index 9c44d004da69..9bc6bb20b6df 100644 --- a/drivers/oprofile/cpu_buffer.h +++ b/drivers/oprofile/cpu_buffer.h | |||
@@ -36,10 +36,10 @@ struct oprofile_cpu_buffer { | |||
36 | volatile unsigned long head_pos; | 36 | volatile unsigned long head_pos; |
37 | volatile unsigned long tail_pos; | 37 | volatile unsigned long tail_pos; |
38 | unsigned long buffer_size; | 38 | unsigned long buffer_size; |
39 | struct task_struct * last_task; | 39 | struct task_struct *last_task; |
40 | int last_is_kernel; | 40 | int last_is_kernel; |
41 | int tracing; | 41 | int tracing; |
42 | struct op_sample * buffer; | 42 | struct op_sample *buffer; |
43 | unsigned long sample_received; | 43 | unsigned long sample_received; |
44 | unsigned long sample_lost_overflow; | 44 | unsigned long sample_lost_overflow; |
45 | unsigned long backtrace_aborted; | 45 | unsigned long backtrace_aborted; |
@@ -50,7 +50,7 @@ struct oprofile_cpu_buffer { | |||
50 | 50 | ||
51 | DECLARE_PER_CPU(struct oprofile_cpu_buffer, cpu_buffer); | 51 | DECLARE_PER_CPU(struct oprofile_cpu_buffer, cpu_buffer); |
52 | 52 | ||
53 | void cpu_buffer_reset(struct oprofile_cpu_buffer * cpu_buf); | 53 | void cpu_buffer_reset(struct oprofile_cpu_buffer *cpu_buf); |
54 | 54 | ||
55 | /* transient events for the CPU buffer -> event buffer */ | 55 | /* transient events for the CPU buffer -> event buffer */ |
56 | #define CPU_IS_KERNEL 1 | 56 | #define CPU_IS_KERNEL 1 |
diff --git a/drivers/oprofile/event_buffer.c b/drivers/oprofile/event_buffer.c index 8d692a5c8e73..c9329f4e090f 100644 --- a/drivers/oprofile/event_buffer.c +++ b/drivers/oprofile/event_buffer.c | |||
@@ -28,7 +28,7 @@ DEFINE_MUTEX(buffer_mutex); | |||
28 | 28 | ||
29 | static unsigned long buffer_opened; | 29 | static unsigned long buffer_opened; |
30 | static DECLARE_WAIT_QUEUE_HEAD(buffer_wait); | 30 | static DECLARE_WAIT_QUEUE_HEAD(buffer_wait); |
31 | static unsigned long * event_buffer; | 31 | static unsigned long *event_buffer; |
32 | static unsigned long buffer_size; | 32 | static unsigned long buffer_size; |
33 | static unsigned long buffer_watershed; | 33 | static unsigned long buffer_watershed; |
34 | static size_t buffer_pos; | 34 | static size_t buffer_pos; |
@@ -98,7 +98,7 @@ void free_event_buffer(void) | |||
98 | } | 98 | } |
99 | 99 | ||
100 | 100 | ||
101 | static int event_buffer_open(struct inode * inode, struct file * file) | 101 | static int event_buffer_open(struct inode *inode, struct file *file) |
102 | { | 102 | { |
103 | int err = -EPERM; | 103 | int err = -EPERM; |
104 | 104 | ||
@@ -134,7 +134,7 @@ out: | |||
134 | } | 134 | } |
135 | 135 | ||
136 | 136 | ||
137 | static int event_buffer_release(struct inode * inode, struct file * file) | 137 | static int event_buffer_release(struct inode *inode, struct file *file) |
138 | { | 138 | { |
139 | oprofile_stop(); | 139 | oprofile_stop(); |
140 | oprofile_shutdown(); | 140 | oprofile_shutdown(); |
@@ -146,8 +146,8 @@ static int event_buffer_release(struct inode * inode, struct file * file) | |||
146 | } | 146 | } |
147 | 147 | ||
148 | 148 | ||
149 | static ssize_t event_buffer_read(struct file * file, char __user * buf, | 149 | static ssize_t event_buffer_read(struct file *file, char __user *buf, |
150 | size_t count, loff_t * offset) | 150 | size_t count, loff_t *offset) |
151 | { | 151 | { |
152 | int retval = -EINVAL; | 152 | int retval = -EINVAL; |
153 | size_t const max = buffer_size * sizeof(unsigned long); | 153 | size_t const max = buffer_size * sizeof(unsigned long); |
diff --git a/drivers/oprofile/oprof.h b/drivers/oprofile/oprof.h index 18323650806e..7a44ddba0beb 100644 --- a/drivers/oprofile/oprof.h +++ b/drivers/oprofile/oprof.h | |||
@@ -31,8 +31,8 @@ extern unsigned long backtrace_depth; | |||
31 | struct super_block; | 31 | struct super_block; |
32 | struct dentry; | 32 | struct dentry; |
33 | 33 | ||
34 | void oprofile_create_files(struct super_block * sb, struct dentry * root); | 34 | void oprofile_create_files(struct super_block *sb, struct dentry *root); |
35 | void oprofile_timer_init(struct oprofile_operations * ops); | 35 | void oprofile_timer_init(struct oprofile_operations *ops); |
36 | 36 | ||
37 | int oprofile_set_backtrace(unsigned long depth); | 37 | int oprofile_set_backtrace(unsigned long depth); |
38 | 38 | ||
diff --git a/drivers/oprofile/oprofile_files.c b/drivers/oprofile/oprofile_files.c index ef953ba5ab6b..241804abbb5c 100644 --- a/drivers/oprofile/oprofile_files.c +++ b/drivers/oprofile/oprofile_files.c | |||
@@ -18,13 +18,13 @@ unsigned long fs_buffer_size = 131072; | |||
18 | unsigned long fs_cpu_buffer_size = 8192; | 18 | unsigned long fs_cpu_buffer_size = 8192; |
19 | unsigned long fs_buffer_watershed = 32768; /* FIXME: tune */ | 19 | unsigned long fs_buffer_watershed = 32768; /* FIXME: tune */ |
20 | 20 | ||
21 | static ssize_t depth_read(struct file * file, char __user * buf, size_t count, loff_t * offset) | 21 | static ssize_t depth_read(struct file *file, char __user *buf, size_t count, loff_t *offset) |
22 | { | 22 | { |
23 | return oprofilefs_ulong_to_user(backtrace_depth, buf, count, offset); | 23 | return oprofilefs_ulong_to_user(backtrace_depth, buf, count, offset); |
24 | } | 24 | } |
25 | 25 | ||
26 | 26 | ||
27 | static ssize_t depth_write(struct file * file, char const __user * buf, size_t count, loff_t * offset) | 27 | static ssize_t depth_write(struct file *file, char const __user *buf, size_t count, loff_t *offset) |
28 | { | 28 | { |
29 | unsigned long val; | 29 | unsigned long val; |
30 | int retval; | 30 | int retval; |
@@ -50,7 +50,7 @@ static const struct file_operations depth_fops = { | |||
50 | }; | 50 | }; |
51 | 51 | ||
52 | 52 | ||
53 | static ssize_t pointer_size_read(struct file * file, char __user * buf, size_t count, loff_t * offset) | 53 | static ssize_t pointer_size_read(struct file *file, char __user *buf, size_t count, loff_t *offset) |
54 | { | 54 | { |
55 | return oprofilefs_ulong_to_user(sizeof(void *), buf, count, offset); | 55 | return oprofilefs_ulong_to_user(sizeof(void *), buf, count, offset); |
56 | } | 56 | } |
@@ -61,7 +61,7 @@ static const struct file_operations pointer_size_fops = { | |||
61 | }; | 61 | }; |
62 | 62 | ||
63 | 63 | ||
64 | static ssize_t cpu_type_read(struct file * file, char __user * buf, size_t count, loff_t * offset) | 64 | static ssize_t cpu_type_read(struct file *file, char __user *buf, size_t count, loff_t *offset) |
65 | { | 65 | { |
66 | return oprofilefs_str_to_user(oprofile_ops.cpu_type, buf, count, offset); | 66 | return oprofilefs_str_to_user(oprofile_ops.cpu_type, buf, count, offset); |
67 | } | 67 | } |
@@ -72,13 +72,13 @@ static const struct file_operations cpu_type_fops = { | |||
72 | }; | 72 | }; |
73 | 73 | ||
74 | 74 | ||
75 | static ssize_t enable_read(struct file * file, char __user * buf, size_t count, loff_t * offset) | 75 | static ssize_t enable_read(struct file *file, char __user *buf, size_t count, loff_t *offset) |
76 | { | 76 | { |
77 | return oprofilefs_ulong_to_user(oprofile_started, buf, count, offset); | 77 | return oprofilefs_ulong_to_user(oprofile_started, buf, count, offset); |
78 | } | 78 | } |
79 | 79 | ||
80 | 80 | ||
81 | static ssize_t enable_write(struct file * file, char const __user * buf, size_t count, loff_t * offset) | 81 | static ssize_t enable_write(struct file *file, char const __user *buf, size_t count, loff_t *offset) |
82 | { | 82 | { |
83 | unsigned long val; | 83 | unsigned long val; |
84 | int retval; | 84 | int retval; |
@@ -107,7 +107,7 @@ static const struct file_operations enable_fops = { | |||
107 | }; | 107 | }; |
108 | 108 | ||
109 | 109 | ||
110 | static ssize_t dump_write(struct file * file, char const __user * buf, size_t count, loff_t * offset) | 110 | static ssize_t dump_write(struct file *file, char const __user *buf, size_t count, loff_t *offset) |
111 | { | 111 | { |
112 | wake_up_buffer_waiter(); | 112 | wake_up_buffer_waiter(); |
113 | return count; | 113 | return count; |
@@ -118,7 +118,7 @@ static const struct file_operations dump_fops = { | |||
118 | .write = dump_write, | 118 | .write = dump_write, |
119 | }; | 119 | }; |
120 | 120 | ||
121 | void oprofile_create_files(struct super_block * sb, struct dentry * root) | 121 | void oprofile_create_files(struct super_block *sb, struct dentry *root) |
122 | { | 122 | { |
123 | oprofilefs_create_file(sb, root, "enable", &enable_fops); | 123 | oprofilefs_create_file(sb, root, "enable", &enable_fops); |
124 | oprofilefs_create_file_perm(sb, root, "dump", &dump_fops, 0666); | 124 | oprofilefs_create_file_perm(sb, root, "dump", &dump_fops, 0666); |
diff --git a/drivers/oprofile/oprofile_stats.c b/drivers/oprofile/oprofile_stats.c index f99b28e7b79a..e0c45498d175 100644 --- a/drivers/oprofile/oprofile_stats.c +++ b/drivers/oprofile/oprofile_stats.c | |||
@@ -19,7 +19,7 @@ struct oprofile_stat_struct oprofile_stats; | |||
19 | 19 | ||
20 | void oprofile_reset_stats(void) | 20 | void oprofile_reset_stats(void) |
21 | { | 21 | { |
22 | struct oprofile_cpu_buffer * cpu_buf; | 22 | struct oprofile_cpu_buffer *cpu_buf; |
23 | int i; | 23 | int i; |
24 | 24 | ||
25 | for_each_possible_cpu(i) { | 25 | for_each_possible_cpu(i) { |
@@ -36,11 +36,11 @@ void oprofile_reset_stats(void) | |||
36 | } | 36 | } |
37 | 37 | ||
38 | 38 | ||
39 | void oprofile_create_stats_files(struct super_block * sb, struct dentry * root) | 39 | void oprofile_create_stats_files(struct super_block *sb, struct dentry *root) |
40 | { | 40 | { |
41 | struct oprofile_cpu_buffer * cpu_buf; | 41 | struct oprofile_cpu_buffer *cpu_buf; |
42 | struct dentry * cpudir; | 42 | struct dentry *cpudir; |
43 | struct dentry * dir; | 43 | struct dentry *dir; |
44 | char buf[10]; | 44 | char buf[10]; |
45 | int i; | 45 | int i; |
46 | 46 | ||
diff --git a/drivers/oprofile/oprofile_stats.h b/drivers/oprofile/oprofile_stats.h index 6d755a633f15..54e59c29b439 100644 --- a/drivers/oprofile/oprofile_stats.h +++ b/drivers/oprofile/oprofile_stats.h | |||
@@ -28,6 +28,6 @@ struct super_block; | |||
28 | struct dentry; | 28 | struct dentry; |
29 | 29 | ||
30 | /* create the stats/ dir */ | 30 | /* create the stats/ dir */ |
31 | void oprofile_create_stats_files(struct super_block * sb, struct dentry * root); | 31 | void oprofile_create_stats_files(struct super_block *sb, struct dentry *root); |
32 | 32 | ||
33 | #endif /* OPROFILE_STATS_H */ | 33 | #endif /* OPROFILE_STATS_H */ |
diff --git a/drivers/oprofile/oprofilefs.c b/drivers/oprofile/oprofilefs.c index 8543cb26cf34..a275a3aa5f0b 100644 --- a/drivers/oprofile/oprofilefs.c +++ b/drivers/oprofile/oprofilefs.c | |||
@@ -23,9 +23,9 @@ | |||
23 | 23 | ||
24 | DEFINE_SPINLOCK(oprofilefs_lock); | 24 | DEFINE_SPINLOCK(oprofilefs_lock); |
25 | 25 | ||
26 | static struct inode * oprofilefs_get_inode(struct super_block * sb, int mode) | 26 | static struct inode *oprofilefs_get_inode(struct super_block *sb, int mode) |
27 | { | 27 | { |
28 | struct inode * inode = new_inode(sb); | 28 | struct inode *inode = new_inode(sb); |
29 | 29 | ||
30 | if (inode) { | 30 | if (inode) { |
31 | inode->i_mode = mode; | 31 | inode->i_mode = mode; |
@@ -44,7 +44,7 @@ static struct super_operations s_ops = { | |||
44 | }; | 44 | }; |
45 | 45 | ||
46 | 46 | ||
47 | ssize_t oprofilefs_str_to_user(char const * str, char __user * buf, size_t count, loff_t * offset) | 47 | ssize_t oprofilefs_str_to_user(char const *str, char __user *buf, size_t count, loff_t *offset) |
48 | { | 48 | { |
49 | return simple_read_from_buffer(buf, count, offset, str, strlen(str)); | 49 | return simple_read_from_buffer(buf, count, offset, str, strlen(str)); |
50 | } | 50 | } |
@@ -52,7 +52,7 @@ ssize_t oprofilefs_str_to_user(char const * str, char __user * buf, size_t count | |||
52 | 52 | ||
53 | #define TMPBUFSIZE 50 | 53 | #define TMPBUFSIZE 50 |
54 | 54 | ||
55 | ssize_t oprofilefs_ulong_to_user(unsigned long val, char __user * buf, size_t count, loff_t * offset) | 55 | ssize_t oprofilefs_ulong_to_user(unsigned long val, char __user *buf, size_t count, loff_t *offset) |
56 | { | 56 | { |
57 | char tmpbuf[TMPBUFSIZE]; | 57 | char tmpbuf[TMPBUFSIZE]; |
58 | size_t maxlen = snprintf(tmpbuf, TMPBUFSIZE, "%lu\n", val); | 58 | size_t maxlen = snprintf(tmpbuf, TMPBUFSIZE, "%lu\n", val); |
@@ -62,7 +62,7 @@ ssize_t oprofilefs_ulong_to_user(unsigned long val, char __user * buf, size_t co | |||
62 | } | 62 | } |
63 | 63 | ||
64 | 64 | ||
65 | int oprofilefs_ulong_from_user(unsigned long * val, char const __user * buf, size_t count) | 65 | int oprofilefs_ulong_from_user(unsigned long *val, char const __user *buf, size_t count) |
66 | { | 66 | { |
67 | char tmpbuf[TMPBUFSIZE]; | 67 | char tmpbuf[TMPBUFSIZE]; |
68 | unsigned long flags; | 68 | unsigned long flags; |
@@ -85,16 +85,16 @@ int oprofilefs_ulong_from_user(unsigned long * val, char const __user * buf, siz | |||
85 | } | 85 | } |
86 | 86 | ||
87 | 87 | ||
88 | static ssize_t ulong_read_file(struct file * file, char __user * buf, size_t count, loff_t * offset) | 88 | static ssize_t ulong_read_file(struct file *file, char __user *buf, size_t count, loff_t *offset) |
89 | { | 89 | { |
90 | unsigned long * val = file->private_data; | 90 | unsigned long *val = file->private_data; |
91 | return oprofilefs_ulong_to_user(*val, buf, count, offset); | 91 | return oprofilefs_ulong_to_user(*val, buf, count, offset); |
92 | } | 92 | } |
93 | 93 | ||
94 | 94 | ||
95 | static ssize_t ulong_write_file(struct file * file, char const __user * buf, size_t count, loff_t * offset) | 95 | static ssize_t ulong_write_file(struct file *file, char const __user *buf, size_t count, loff_t *offset) |
96 | { | 96 | { |
97 | unsigned long * value = file->private_data; | 97 | unsigned long *value = file->private_data; |
98 | int retval; | 98 | int retval; |
99 | 99 | ||
100 | if (*offset) | 100 | if (*offset) |
@@ -108,7 +108,7 @@ static ssize_t ulong_write_file(struct file * file, char const __user * buf, siz | |||
108 | } | 108 | } |
109 | 109 | ||
110 | 110 | ||
111 | static int default_open(struct inode * inode, struct file * filp) | 111 | static int default_open(struct inode *inode, struct file *filp) |
112 | { | 112 | { |
113 | if (inode->i_private) | 113 | if (inode->i_private) |
114 | filp->private_data = inode->i_private; | 114 | filp->private_data = inode->i_private; |
@@ -129,12 +129,12 @@ static const struct file_operations ulong_ro_fops = { | |||
129 | }; | 129 | }; |
130 | 130 | ||
131 | 131 | ||
132 | static struct dentry * __oprofilefs_create_file(struct super_block * sb, | 132 | static struct dentry *__oprofilefs_create_file(struct super_block *sb, |
133 | struct dentry * root, char const * name, const struct file_operations * fops, | 133 | struct dentry *root, char const *name, const struct file_operations *fops, |
134 | int perm) | 134 | int perm) |
135 | { | 135 | { |
136 | struct dentry * dentry; | 136 | struct dentry *dentry; |
137 | struct inode * inode; | 137 | struct inode *inode; |
138 | 138 | ||
139 | dentry = d_alloc_name(root, name); | 139 | dentry = d_alloc_name(root, name); |
140 | if (!dentry) | 140 | if (!dentry) |
@@ -150,10 +150,10 @@ static struct dentry * __oprofilefs_create_file(struct super_block * sb, | |||
150 | } | 150 | } |
151 | 151 | ||
152 | 152 | ||
153 | int oprofilefs_create_ulong(struct super_block * sb, struct dentry * root, | 153 | int oprofilefs_create_ulong(struct super_block *sb, struct dentry *root, |
154 | char const * name, unsigned long * val) | 154 | char const *name, unsigned long *val) |
155 | { | 155 | { |
156 | struct dentry * d = __oprofilefs_create_file(sb, root, name, | 156 | struct dentry *d = __oprofilefs_create_file(sb, root, name, |
157 | &ulong_fops, 0644); | 157 | &ulong_fops, 0644); |
158 | if (!d) | 158 | if (!d) |
159 | return -EFAULT; | 159 | return -EFAULT; |
@@ -163,10 +163,10 @@ int oprofilefs_create_ulong(struct super_block * sb, struct dentry * root, | |||
163 | } | 163 | } |
164 | 164 | ||
165 | 165 | ||
166 | int oprofilefs_create_ro_ulong(struct super_block * sb, struct dentry * root, | 166 | int oprofilefs_create_ro_ulong(struct super_block *sb, struct dentry *root, |
167 | char const * name, unsigned long * val) | 167 | char const *name, unsigned long *val) |
168 | { | 168 | { |
169 | struct dentry * d = __oprofilefs_create_file(sb, root, name, | 169 | struct dentry *d = __oprofilefs_create_file(sb, root, name, |
170 | &ulong_ro_fops, 0444); | 170 | &ulong_ro_fops, 0444); |
171 | if (!d) | 171 | if (!d) |
172 | return -EFAULT; | 172 | return -EFAULT; |
@@ -176,9 +176,9 @@ int oprofilefs_create_ro_ulong(struct super_block * sb, struct dentry * root, | |||
176 | } | 176 | } |
177 | 177 | ||
178 | 178 | ||
179 | static ssize_t atomic_read_file(struct file * file, char __user * buf, size_t count, loff_t * offset) | 179 | static ssize_t atomic_read_file(struct file *file, char __user *buf, size_t count, loff_t *offset) |
180 | { | 180 | { |
181 | atomic_t * val = file->private_data; | 181 | atomic_t *val = file->private_data; |
182 | return oprofilefs_ulong_to_user(atomic_read(val), buf, count, offset); | 182 | return oprofilefs_ulong_to_user(atomic_read(val), buf, count, offset); |
183 | } | 183 | } |
184 | 184 | ||
@@ -189,10 +189,10 @@ static const struct file_operations atomic_ro_fops = { | |||
189 | }; | 189 | }; |
190 | 190 | ||
191 | 191 | ||
192 | int oprofilefs_create_ro_atomic(struct super_block * sb, struct dentry * root, | 192 | int oprofilefs_create_ro_atomic(struct super_block *sb, struct dentry *root, |
193 | char const * name, atomic_t * val) | 193 | char const *name, atomic_t *val) |
194 | { | 194 | { |
195 | struct dentry * d = __oprofilefs_create_file(sb, root, name, | 195 | struct dentry *d = __oprofilefs_create_file(sb, root, name, |
196 | &atomic_ro_fops, 0444); | 196 | &atomic_ro_fops, 0444); |
197 | if (!d) | 197 | if (!d) |
198 | return -EFAULT; | 198 | return -EFAULT; |
@@ -202,8 +202,8 @@ int oprofilefs_create_ro_atomic(struct super_block * sb, struct dentry * root, | |||
202 | } | 202 | } |
203 | 203 | ||
204 | 204 | ||
205 | int oprofilefs_create_file(struct super_block * sb, struct dentry * root, | 205 | int oprofilefs_create_file(struct super_block *sb, struct dentry *root, |
206 | char const * name, const struct file_operations * fops) | 206 | char const *name, const struct file_operations *fops) |
207 | { | 207 | { |
208 | if (!__oprofilefs_create_file(sb, root, name, fops, 0644)) | 208 | if (!__oprofilefs_create_file(sb, root, name, fops, 0644)) |
209 | return -EFAULT; | 209 | return -EFAULT; |
@@ -211,8 +211,8 @@ int oprofilefs_create_file(struct super_block * sb, struct dentry * root, | |||
211 | } | 211 | } |
212 | 212 | ||
213 | 213 | ||
214 | int oprofilefs_create_file_perm(struct super_block * sb, struct dentry * root, | 214 | int oprofilefs_create_file_perm(struct super_block *sb, struct dentry *root, |
215 | char const * name, const struct file_operations * fops, int perm) | 215 | char const *name, const struct file_operations *fops, int perm) |
216 | { | 216 | { |
217 | if (!__oprofilefs_create_file(sb, root, name, fops, perm)) | 217 | if (!__oprofilefs_create_file(sb, root, name, fops, perm)) |
218 | return -EFAULT; | 218 | return -EFAULT; |
@@ -220,11 +220,11 @@ int oprofilefs_create_file_perm(struct super_block * sb, struct dentry * root, | |||
220 | } | 220 | } |
221 | 221 | ||
222 | 222 | ||
223 | struct dentry * oprofilefs_mkdir(struct super_block * sb, | 223 | struct dentry *oprofilefs_mkdir(struct super_block *sb, |
224 | struct dentry * root, char const * name) | 224 | struct dentry *root, char const *name) |
225 | { | 225 | { |
226 | struct dentry * dentry; | 226 | struct dentry *dentry; |
227 | struct inode * inode; | 227 | struct inode *inode; |
228 | 228 | ||
229 | dentry = d_alloc_name(root, name); | 229 | dentry = d_alloc_name(root, name); |
230 | if (!dentry) | 230 | if (!dentry) |
@@ -241,10 +241,10 @@ struct dentry * oprofilefs_mkdir(struct super_block * sb, | |||
241 | } | 241 | } |
242 | 242 | ||
243 | 243 | ||
244 | static int oprofilefs_fill_super(struct super_block * sb, void * data, int silent) | 244 | static int oprofilefs_fill_super(struct super_block *sb, void *data, int silent) |
245 | { | 245 | { |
246 | struct inode * root_inode; | 246 | struct inode *root_inode; |
247 | struct dentry * root_dentry; | 247 | struct dentry *root_dentry; |
248 | 248 | ||
249 | sb->s_blocksize = PAGE_CACHE_SIZE; | 249 | sb->s_blocksize = PAGE_CACHE_SIZE; |
250 | sb->s_blocksize_bits = PAGE_CACHE_SHIFT; | 250 | sb->s_blocksize_bits = PAGE_CACHE_SHIFT; |
diff --git a/drivers/oprofile/timer_int.c b/drivers/oprofile/timer_int.c index 710a45f0d734..7258b141a510 100644 --- a/drivers/oprofile/timer_int.c +++ b/drivers/oprofile/timer_int.c | |||
@@ -35,7 +35,7 @@ static void timer_stop(void) | |||
35 | } | 35 | } |
36 | 36 | ||
37 | 37 | ||
38 | void __init oprofile_timer_init(struct oprofile_operations * ops) | 38 | void __init oprofile_timer_init(struct oprofile_operations *ops) |
39 | { | 39 | { |
40 | ops->create_files = NULL; | 40 | ops->create_files = NULL; |
41 | ops->setup = NULL; | 41 | ops->setup = NULL; |