]> git.hungrycats.org Git - linux/commitdiff
[PATCH] annotations in drivers/video
authorAlexander Viro <viro@www.linux.org.uk>
Fri, 30 Jul 2004 15:47:17 +0000 (08:47 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 30 Jul 2004 15:47:17 +0000 (08:47 -0700)
Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/video/aty/aty128fb.c
drivers/video/aty/atyfb_base.c
drivers/video/cg14.c
drivers/video/sbuslib.c
include/asm-sparc64/fbio.h

index bd907297c4614106201455819e5800fd09a8ca9f..1c7bcd80f4ba0e99a26b50572ace58f0c4e53f24 100644 (file)
@@ -2149,7 +2149,7 @@ static int aty128fb_ioctl(struct inode *inode, struct file *file, u_int cmd,
        case FBIO_ATY128_SET_MIRROR:
                if (par->chip_gen != rage_M3)
                        return -EINVAL;
-               rc = get_user(value, (__u32*)arg);
+               rc = get_user(value, (__u32 __user *)arg);
                if (rc)
                        return rc;
                par->lcd_on = (value & 0x01) != 0;
@@ -2163,7 +2163,7 @@ static int aty128fb_ioctl(struct inode *inode, struct file *file, u_int cmd,
                if (par->chip_gen != rage_M3)
                        return -EINVAL;
                value = (par->crt_on << 1) | par->lcd_on;
-               return put_user(value, (__u32*)arg);
+               return put_user(value, (__u32 __user *)arg);
        }
 #endif
        return -EINVAL;
index a655884f432aa8ec879f99148d7d14b2032494f6..37177becebcba8a7f76d3dc9cb88660afbcd926f 100644 (file)
@@ -1037,7 +1037,7 @@ static int atyfb_ioctl(struct inode *inode, struct file *file, u_int cmd,
                fbtyp.fb_cmsize = info->cmap.len;
                fbtyp.fb_size = info->fix.smem_len;
                if (copy_to_user
-                   ((struct fbtype *) arg, &fbtyp, sizeof(fbtyp)))
+                   ((struct fbtype __user *) arg, &fbtyp, sizeof(fbtyp)))
                        return -EFAULT;
                break;
 #endif                         /* __sparc__ */
index 40d28baf46c200ee018637f92fcdb26e565dd6c0..e0fc4c02c3bf80d14fb559e3ba36306c24bd4bbd 100644 (file)
@@ -278,7 +278,7 @@ static int cg14_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
 {
        struct cg14_par *par = (struct cg14_par *) info->par;
        struct cg14_regs *regs = par->regs;
-       struct mdi_cfginfo kmdi, *mdii;
+       struct mdi_cfginfo kmdi, __user *mdii;
        unsigned long flags;
        int cur_mode, mode, ret = 0;
 
@@ -301,13 +301,13 @@ static int cg14_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
                kmdi.mdi_size = par->ramsize;
                spin_unlock_irqrestore(&par->lock, flags);
 
-               mdii = (struct mdi_cfginfo *) arg;
+               mdii = (struct mdi_cfginfo __user *) arg;
                if (copy_to_user(mdii, &kmdi, sizeof(kmdi)))
                        ret = -EFAULT;
                break;
 
        case MDI_SET_PIXELMODE:
-               if (get_user(mode, (int *) arg)) {
+               if (get_user(mode, (int __user *) arg)) {
                        ret = -EFAULT;
                        break;
                }
index eeeb462d3376a93bb80439c97b6bd1115a0e734d..3820d7e628657664a0e791571c44b68bc64eeda5 100644 (file)
@@ -93,7 +93,7 @@ int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg,
 {
        switch(cmd) {
        case FBIOGTYPE: {
-               struct fbtype *f = (struct fbtype *) arg;
+               struct fbtype __user *f = (struct fbtype __user *) arg;
 
                if (put_user(type, &f->fb_type) ||
                    __put_user(info->var.yres, &f->fb_height) ||
@@ -105,10 +105,12 @@ int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg,
                return 0;
        }
        case FBIOPUTCMAP_SPARC: {
-               struct fbcmap *c = (struct fbcmap *) arg;
+               struct fbcmap __user *c = (struct fbcmap __user *) arg;
                struct fb_cmap cmap;
                u16 red, green, blue;
-               unsigned char *ured, *ugreen, *ublue;
+               unsigned char __user *ured;
+               unsigned char __user *ugreen;
+               unsigned char __user *ublue;
                int index, count, i;
 
                if (get_user(index, &c->index) ||
@@ -139,8 +141,10 @@ int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg,
                return 0;
        }
        case FBIOGETCMAP_SPARC: {
-               struct fbcmap *c = (struct fbcmap *) arg;
-               unsigned char *ured, *ugreen, *ublue;
+               struct fbcmap __user *c = (struct fbcmap __user *) arg;
+               unsigned char __user *ured;
+               unsigned char __user *ugreen;
+               unsigned char __user *ublue;
                struct fb_cmap *cmap = &info->cmap;
                int index, count, i;
 
index f21477bcfafca297d6f884e11032fbef12bc78f0..c6c4da6e139de411ab609395e06071a2405fa2cf 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef __LINUX_FBIO_H
 #define __LINUX_FBIO_H
 
+#include <linux/compiler.h>
+
 /* Constants used for fbio SunOS compatibility */
 /* (C) 1996 Miguel de Icaza */
 
@@ -56,9 +58,9 @@ struct  fbtype {
 struct  fbcmap {
         int             index;          /* first element (0 origin) */
         int             count;
-        unsigned char   *red;
-        unsigned char   *green;
-        unsigned char   *blue;
+        unsigned char   __user *red;
+        unsigned char   __user *green;
+        unsigned char   __user *blue;
 };
 
 #ifdef __KERNEL__