From 12c7588eb14e885601b3a0cbda3b8bde6cfc364b Mon Sep 17 00:00:00 2001 From: "Andries E. Brouwer" Date: Mon, 8 Sep 2003 18:54:47 -0700 Subject: [PATCH] [PATCH] sparse fix for proc/misc --- fs/proc/proc_misc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index e042f16e87645..9ccdfe207e750 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c @@ -343,7 +343,7 @@ static struct file_operations proc_modules_operations = { #endif extern struct seq_operations slabinfo_op; -extern ssize_t slabinfo_write(struct file *, const char *, size_t, loff_t *); +extern ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *); static int slabinfo_open(struct inode *inode, struct file *file) { return seq_open(file, &slabinfo_op); @@ -548,8 +548,8 @@ static int execdomains_read_proc(char *page, char **start, off_t off, * buffer. Use of the program readprofile is recommended in order to * get meaningful info out of these data. */ -static ssize_t read_profile(struct file *file, char *buf, - size_t count, loff_t *ppos) +static ssize_t +read_profile(struct file *file, char __user *buf, size_t count, loff_t *ppos) { unsigned long p = *ppos; ssize_t read; @@ -580,13 +580,13 @@ static ssize_t read_profile(struct file *file, char *buf, * Writing a 'profiling multiplier' value into it also re-sets the profiling * interrupt frequency, on architectures that support this. */ -static ssize_t write_profile(struct file * file, const char * buf, +static ssize_t write_profile(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { #ifdef CONFIG_SMP extern int setup_profiling_timer (unsigned int multiplier); - if (count==sizeof(int)) { + if (count == sizeof(int)) { unsigned int multiplier; if (copy_from_user(&multiplier, buf, sizeof(int))) @@ -610,8 +610,8 @@ static struct file_operations proc_profile_operations = { /* * writing 'C' to /proc/sysrq-trigger is like sysrq-C */ -static ssize_t write_sysrq_trigger(struct file *file, const char *buf, - size_t count, loff_t *ppos) +static ssize_t write_sysrq_trigger(struct file *file, const char __user *buf, + size_t count, loff_t *ppos) { if (count) { char c; -- 2.53.0