]> git.hungrycats.org Git - linux/commitdiff
[PATCH] sparse fix for proc/misc
authorAndries E. Brouwer <andries.brouwer@cwi.nl>
Tue, 9 Sep 2003 01:54:47 +0000 (18:54 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 9 Sep 2003 01:54:47 +0000 (18:54 -0700)
fs/proc/proc_misc.c

index e042f16e876451d43aa77bf171165cbee48b97b2..9ccdfe207e7509070ac6507e0d04b01e6b18f65f 100644 (file)
@@ -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;