oprofile: fixing whitespaces in drivers/oprofile/*

Signed-off-by: Robert Richter <robert.richter@amd.com>
diff --git a/drivers/oprofile/buffer_sync.h b/drivers/oprofile/buffer_sync.h
index 08866f6..3110732 100644
--- a/drivers/oprofile/buffer_sync.h
+++ b/drivers/oprofile/buffer_sync.h
@@ -9,13 +9,13 @@
 
 #ifndef OPROFILE_BUFFER_SYNC_H
 #define OPROFILE_BUFFER_SYNC_H
- 
+
 /* add the necessary profiling hooks */
 int sync_start(void);
 
 /* remove the hooks */
 void sync_stop(void);
- 
+
 /* sync the given CPU's buffer */
 void sync_buffer(int cpu);
 
diff --git a/drivers/oprofile/cpu_buffer.c b/drivers/oprofile/cpu_buffer.c
index b47ce03..5a17806 100644
--- a/drivers/oprofile/cpu_buffer.c
+++ b/drivers/oprofile/cpu_buffer.c
@@ -22,7 +22,7 @@
 #include <linux/oprofile.h>
 #include <linux/vmalloc.h>
 #include <linux/errno.h>
- 
+
 #include "event_buffer.h"
 #include "cpu_buffer.h"
 #include "buffer_sync.h"
@@ -38,7 +38,7 @@
 void free_cpu_buffers(void)
 {
 	int i;
- 
+
 	for_each_online_cpu(i) {
 		vfree(per_cpu(cpu_buffer, i).buffer);
 		per_cpu(cpu_buffer, i).buffer = NULL;
@@ -48,17 +48,17 @@
 int alloc_cpu_buffers(void)
 {
 	int i;
- 
+
 	unsigned long buffer_size = fs_cpu_buffer_size;
- 
+
 	for_each_online_cpu(i) {
 		struct oprofile_cpu_buffer *b = &per_cpu(cpu_buffer, i);
- 
+
 		b->buffer = vmalloc_node(sizeof(struct op_sample) * buffer_size,
 			cpu_to_node(i));
 		if (!b->buffer)
 			goto fail;
- 
+
 		b->last_task = NULL;
 		b->last_is_kernel = -1;
 		b->tracing = 0;
@@ -150,7 +150,7 @@
 
 static inline void
 add_sample(struct oprofile_cpu_buffer *cpu_buf,
-           unsigned long pc, unsigned long event)
+	   unsigned long pc, unsigned long event)
 {
 	struct op_sample *entry = &cpu_buf->buffer[cpu_buf->head_pos];
 	entry->eip = pc;
@@ -205,7 +205,7 @@
 		cpu_buf->last_task = task;
 		add_code(cpu_buf, (unsigned long)task);
 	}
- 
+
 	add_sample(cpu_buf, pc, event);
 	return 1;
 }
diff --git a/drivers/oprofile/cpu_buffer.h b/drivers/oprofile/cpu_buffer.h
index 9bc6bb2..d3cc262 100644
--- a/drivers/oprofile/cpu_buffer.h
+++ b/drivers/oprofile/cpu_buffer.h
@@ -15,9 +15,9 @@
 #include <linux/workqueue.h>
 #include <linux/cache.h>
 #include <linux/sched.h>
- 
+
 struct task_struct;
- 
+
 int alloc_cpu_buffers(void);
 void free_cpu_buffers(void);
 
@@ -31,7 +31,7 @@
 	unsigned long eip;
 	unsigned long event;
 };
- 
+
 struct oprofile_cpu_buffer {
 	volatile unsigned long head_pos;
 	volatile unsigned long tail_pos;
diff --git a/drivers/oprofile/event_buffer.c b/drivers/oprofile/event_buffer.c
index c9329f4..d962ba0 100644
--- a/drivers/oprofile/event_buffer.c
+++ b/drivers/oprofile/event_buffer.c
@@ -19,13 +19,13 @@
 #include <linux/dcookies.h>
 #include <linux/fs.h>
 #include <asm/uaccess.h>
- 
+
 #include "oprof.h"
 #include "event_buffer.h"
 #include "oprofile_stats.h"
 
 DEFINE_MUTEX(buffer_mutex);
- 
+
 static unsigned long buffer_opened;
 static DECLARE_WAIT_QUEUE_HEAD(buffer_wait);
 static unsigned long *event_buffer;
@@ -66,7 +66,7 @@
 	mutex_unlock(&buffer_mutex);
 }
 
- 
+
 int alloc_event_buffer(void)
 {
 	int err = -ENOMEM;
@@ -76,13 +76,13 @@
 	buffer_size = fs_buffer_size;
 	buffer_watershed = fs_buffer_watershed;
 	spin_unlock_irqrestore(&oprofilefs_lock, flags);
- 
+
 	if (buffer_watershed >= buffer_size)
 		return -EINVAL;
- 
+
 	event_buffer = vmalloc(sizeof(unsigned long) * buffer_size);
 	if (!event_buffer)
-		goto out; 
+		goto out;
 
 	err = 0;
 out:
@@ -97,7 +97,7 @@
 	event_buffer = NULL;
 }
 
- 
+
 static int event_buffer_open(struct inode *inode, struct file *file)
 {
 	int err = -EPERM;
@@ -116,14 +116,14 @@
 	file->private_data = dcookie_register();
 	if (!file->private_data)
 		goto out;
-		 
+
 	if ((err = oprofile_setup()))
 		goto fail;
 
 	/* NB: the actual start happens from userspace
 	 * echo 1 >/dev/oprofile/enable
 	 */
- 
+
 	return 0;
 
 fail:
@@ -172,18 +172,18 @@
 	retval = -EFAULT;
 
 	count = buffer_pos * sizeof(unsigned long);
- 
+
 	if (copy_to_user(buf, event_buffer, count))
 		goto out;
 
 	retval = count;
 	buffer_pos = 0;
- 
+
 out:
 	mutex_unlock(&buffer_mutex);
 	return retval;
 }
- 
+
 const struct file_operations event_buffer_fops = {
 	.open		= event_buffer_open,
 	.release	= event_buffer_release,
diff --git a/drivers/oprofile/event_buffer.h b/drivers/oprofile/event_buffer.h
index 5076ed1..00db2e6 100644
--- a/drivers/oprofile/event_buffer.h
+++ b/drivers/oprofile/event_buffer.h
@@ -10,13 +10,13 @@
 #ifndef EVENT_BUFFER_H
 #define EVENT_BUFFER_H
 
-#include <linux/types.h> 
+#include <linux/types.h>
 #include <asm/mutex.h>
- 
+
 int alloc_event_buffer(void);
 
 void free_event_buffer(void);
- 
+
 /* wake up the process sleeping on the event file */
 void wake_up_buffer_waiter(void);
 
@@ -24,10 +24,10 @@
 #define NO_COOKIE 0UL
 
 extern const struct file_operations event_buffer_fops;
- 
+
 /* mutex between sync_cpu_buffers() and the
  * file reading code.
  */
 extern struct mutex buffer_mutex;
- 
+
 #endif /* EVENT_BUFFER_H */
diff --git a/drivers/oprofile/oprof.c b/drivers/oprofile/oprof.c
index 50062ce..cd37590 100644
--- a/drivers/oprofile/oprof.c
+++ b/drivers/oprofile/oprof.c
@@ -94,7 +94,7 @@
 	int err = -EINVAL;
 
 	mutex_lock(&start_mutex);
- 
+
 	if (!is_setup)
 		goto out;
 
diff --git a/drivers/oprofile/oprof.h b/drivers/oprofile/oprof.h
index 7a44ddb..5df0c21 100644
--- a/drivers/oprofile/oprof.h
+++ b/drivers/oprofile/oprof.h
@@ -11,7 +11,7 @@
 #define OPROF_H
 
 int oprofile_setup(void);
-void oprofile_shutdown(void); 
+void oprofile_shutdown(void);
 
 int oprofilefs_register(void);
 void oprofilefs_unregister(void);
@@ -20,14 +20,14 @@
 void oprofile_stop(void);
 
 struct oprofile_operations;
- 
+
 extern unsigned long fs_buffer_size;
 extern unsigned long fs_cpu_buffer_size;
 extern unsigned long fs_buffer_watershed;
 extern struct oprofile_operations oprofile_ops;
 extern unsigned long oprofile_started;
 extern unsigned long backtrace_depth;
- 
+
 struct super_block;
 struct dentry;
 
@@ -35,5 +35,5 @@
 void oprofile_timer_init(struct oprofile_operations *ops);
 
 int oprofile_set_backtrace(unsigned long depth);
- 
+
 #endif /* OPROF_H */
diff --git a/drivers/oprofile/oprofile_files.c b/drivers/oprofile/oprofile_files.c
index 241804a..cc106d5 100644
--- a/drivers/oprofile/oprofile_files.c
+++ b/drivers/oprofile/oprofile_files.c
@@ -13,7 +13,7 @@
 #include "event_buffer.h"
 #include "oprofile_stats.h"
 #include "oprof.h"
- 
+
 unsigned long fs_buffer_size = 131072;
 unsigned long fs_cpu_buffer_size = 8192;
 unsigned long fs_buffer_watershed = 32768; /* FIXME: tune */
@@ -49,7 +49,7 @@
 	.write		= depth_write
 };
 
- 
+
 static ssize_t pointer_size_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
 {
 	return oprofilefs_ulong_to_user(sizeof(void *), buf, count, offset);
@@ -65,13 +65,13 @@
 {
 	return oprofilefs_str_to_user(oprofile_ops.cpu_type, buf, count, offset);
 }
- 
- 
+
+
 static const struct file_operations cpu_type_fops = {
 	.read		= cpu_type_read,
 };
- 
- 
+
+
 static ssize_t enable_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
 {
 	return oprofilefs_ulong_to_user(oprofile_started, buf, count, offset);
@@ -89,7 +89,7 @@
 	retval = oprofilefs_ulong_from_user(&val, buf, count);
 	if (retval)
 		return retval;
- 
+
 	if (val)
 		retval = oprofile_start();
 	else
@@ -100,7 +100,7 @@
 	return count;
 }
 
- 
+
 static const struct file_operations enable_fops = {
 	.read		= enable_read,
 	.write		= enable_write,
@@ -117,7 +117,7 @@
 static const struct file_operations dump_fops = {
 	.write		= dump_write,
 };
- 
+
 void oprofile_create_files(struct super_block *sb, struct dentry *root)
 {
 	oprofilefs_create_file(sb, root, "enable", &enable_fops);
@@ -126,7 +126,7 @@
 	oprofilefs_create_ulong(sb, root, "buffer_size", &fs_buffer_size);
 	oprofilefs_create_ulong(sb, root, "buffer_watershed", &fs_buffer_watershed);
 	oprofilefs_create_ulong(sb, root, "cpu_buffer_size", &fs_cpu_buffer_size);
-	oprofilefs_create_file(sb, root, "cpu_type", &cpu_type_fops); 
+	oprofilefs_create_file(sb, root, "cpu_type", &cpu_type_fops);
 	oprofilefs_create_file(sb, root, "backtrace_depth", &depth_fops);
 	oprofilefs_create_file(sb, root, "pointer_size", &pointer_size_fops);
 	oprofile_create_stats_files(sb, root);
diff --git a/drivers/oprofile/oprofile_stats.c b/drivers/oprofile/oprofile_stats.c
index e0c4549..e1f6ce0 100644
--- a/drivers/oprofile/oprofile_stats.c
+++ b/drivers/oprofile/oprofile_stats.c
@@ -11,17 +11,17 @@
 #include <linux/smp.h>
 #include <linux/cpumask.h>
 #include <linux/threads.h>
- 
+
 #include "oprofile_stats.h"
 #include "cpu_buffer.h"
- 
+
 struct oprofile_stat_struct oprofile_stats;
- 
+
 void oprofile_reset_stats(void)
 {
 	struct oprofile_cpu_buffer *cpu_buf;
 	int i;
- 
+
 	for_each_possible_cpu(i) {
 		cpu_buf = &per_cpu(cpu_buffer, i);
 		cpu_buf->sample_received = 0;
@@ -29,7 +29,7 @@
 		cpu_buf->backtrace_aborted = 0;
 		cpu_buf->sample_invalid_eip = 0;
 	}
- 
+
 	atomic_set(&oprofile_stats.sample_lost_no_mm, 0);
 	atomic_set(&oprofile_stats.sample_lost_no_mapping, 0);
 	atomic_set(&oprofile_stats.event_lost_overflow, 0);
@@ -52,7 +52,7 @@
 		cpu_buf = &per_cpu(cpu_buffer, i);
 		snprintf(buf, 10, "cpu%d", i);
 		cpudir = oprofilefs_mkdir(sb, dir, buf);
- 
+
 		/* Strictly speaking access to these ulongs is racy,
 		 * but we can't simply lock them, and they are
 		 * informational only.
@@ -66,7 +66,7 @@
 		oprofilefs_create_ro_ulong(sb, cpudir, "sample_invalid_eip",
 			&cpu_buf->sample_invalid_eip);
 	}
- 
+
 	oprofilefs_create_ro_atomic(sb, dir, "sample_lost_no_mm",
 		&oprofile_stats.sample_lost_no_mm);
 	oprofilefs_create_ro_atomic(sb, dir, "sample_lost_no_mapping",
diff --git a/drivers/oprofile/oprofile_stats.h b/drivers/oprofile/oprofile_stats.h
index 54e59c2..3da0d08 100644
--- a/drivers/oprofile/oprofile_stats.h
+++ b/drivers/oprofile/oprofile_stats.h
@@ -11,7 +11,7 @@
 #define OPROFILE_STATS_H
 
 #include <asm/atomic.h>
- 
+
 struct oprofile_stat_struct {
 	atomic_t sample_lost_no_mm;
 	atomic_t sample_lost_no_mapping;
@@ -20,13 +20,13 @@
 };
 
 extern struct oprofile_stat_struct oprofile_stats;
- 
+
 /* reset all stats to zero */
 void oprofile_reset_stats(void);
- 
+
 struct super_block;
 struct dentry;
- 
+
 /* create the stats/ dir */
 void oprofile_create_stats_files(struct super_block *sb, struct dentry *root);
 
diff --git a/drivers/oprofile/oprofilefs.c b/drivers/oprofile/oprofilefs.c
index a275a3a..ddc4c59 100644
--- a/drivers/oprofile/oprofilefs.c
+++ b/drivers/oprofile/oprofilefs.c
@@ -181,13 +181,13 @@
 	atomic_t *val = file->private_data;
 	return oprofilefs_ulong_to_user(atomic_read(val), buf, count, offset);
 }
- 
+
 
 static const struct file_operations atomic_ro_fops = {
 	.read		= atomic_read_file,
 	.open		= default_open,
 };
- 
+
 
 int oprofilefs_create_ro_atomic(struct super_block *sb, struct dentry *root,
 	char const *name, atomic_t *val)
@@ -201,7 +201,7 @@
 	return 0;
 }
 
- 
+
 int oprofilefs_create_file(struct super_block *sb, struct dentry *root,
 	char const *name, const struct file_operations *fops)
 {
diff --git a/drivers/oprofile/timer_int.c b/drivers/oprofile/timer_int.c
index 7258b14..333f915 100644
--- a/drivers/oprofile/timer_int.c
+++ b/drivers/oprofile/timer_int.c
@@ -19,7 +19,7 @@
 
 static int timer_notify(struct pt_regs *regs)
 {
- 	oprofile_add_sample(regs, 0);
+	oprofile_add_sample(regs, 0);
 	return 0;
 }