MIPS: sibyte: Add missing __user annotations in sb_tbprof.c
authorThomas Bogendoerfer <tsbogend@alpha.franken.de>
Thu, 17 Feb 2022 14:21:17 +0000 (15:21 +0100)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Tue, 22 Feb 2022 08:36:04 +0000 (09:36 +0100)
Add missing __user annotations to fix sparse errors.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/sibyte/common/sb_tbprof.c

index f80d7a7..bc47681 100644 (file)
@@ -437,13 +437,13 @@ static int sbprof_tb_release(struct inode *inode, struct file *filp)
        return 0;
 }
 
-static ssize_t sbprof_tb_read(struct file *filp, char *buf,
+static ssize_t sbprof_tb_read(struct file *filp, char __user *buf,
                              size_t size, loff_t *offp)
 {
        int cur_sample, sample_off, cur_count, sample_left;
        char *src;
        int   count   =  0;
-       char *dest    =  buf;
+       char __user *dest    =   buf;
        long  cur_off = *offp;
 
        if (!access_ok(buf, size))
@@ -512,7 +512,7 @@ static long sbprof_tb_ioctl(struct file *filp,
                if (err)
                        break;
 
-               err = put_user(TB_FULL, (int *) arg);
+               err = put_user(TB_FULL, (int __user *) arg);
                break;
        }