aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/via_mm.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2005-07-27 14:43:56 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-27 19:25:54 -0400
commitbbaf364103cee15c895e2086723d0ad9ef47ae99 (patch)
tree50ba44d1a55f00c2d328a6943acc4495337b7020 /drivers/char/drm/via_mm.c
parentdb1de1595d03d3ddea3e0548b20decb0a32e4258 (diff)
[PATCH] drm: via: fix sparse warnings
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Dave Airlie <airlied@linux.ie> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/drm/via_mm.c')
-rw-r--r--drivers/char/drm/via_mm.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/char/drm/via_mm.c b/drivers/char/drm/via_mm.c
index c22712f44d42..13921f3c0ec2 100644
--- a/drivers/char/drm/via_mm.c
+++ b/drivers/char/drm/via_mm.c
@@ -76,7 +76,8 @@ int via_agp_init(DRM_IOCTL_ARGS)
76{ 76{
77 drm_via_agp_t agp; 77 drm_via_agp_t agp;
78 78
79 DRM_COPY_FROM_USER_IOCTL(agp, (drm_via_agp_t *) data, sizeof(agp)); 79 DRM_COPY_FROM_USER_IOCTL(agp, (drm_via_agp_t __user *) data,
80 sizeof(agp));
80 81
81 AgpHeap = via_mmInit(agp.offset, agp.size); 82 AgpHeap = via_mmInit(agp.offset, agp.size);
82 83
@@ -92,7 +93,7 @@ int via_fb_init(DRM_IOCTL_ARGS)
92{ 93{
93 drm_via_fb_t fb; 94 drm_via_fb_t fb;
94 95
95 DRM_COPY_FROM_USER_IOCTL(fb, (drm_via_fb_t *) data, sizeof(fb)); 96 DRM_COPY_FROM_USER_IOCTL(fb, (drm_via_fb_t __user *) data, sizeof(fb));
96 97
97 FBHeap = via_mmInit(fb.offset, fb.size); 98 FBHeap = via_mmInit(fb.offset, fb.size);
98 99
@@ -193,19 +194,20 @@ int via_mem_alloc(DRM_IOCTL_ARGS)
193{ 194{
194 drm_via_mem_t mem; 195 drm_via_mem_t mem;
195 196
196 DRM_COPY_FROM_USER_IOCTL(mem, (drm_via_mem_t *) data, sizeof(mem)); 197 DRM_COPY_FROM_USER_IOCTL(mem, (drm_via_mem_t __user *) data,
198 sizeof(mem));
197 199
198 switch (mem.type) { 200 switch (mem.type) {
199 case VIDEO: 201 case VIDEO:
200 if (via_fb_alloc(&mem) < 0) 202 if (via_fb_alloc(&mem) < 0)
201 return -EFAULT; 203 return -EFAULT;
202 DRM_COPY_TO_USER_IOCTL((drm_via_mem_t *) data, mem, 204 DRM_COPY_TO_USER_IOCTL((drm_via_mem_t __user *) data, mem,
203 sizeof(mem)); 205 sizeof(mem));
204 return 0; 206 return 0;
205 case AGP: 207 case AGP:
206 if (via_agp_alloc(&mem) < 0) 208 if (via_agp_alloc(&mem) < 0)
207 return -EFAULT; 209 return -EFAULT;
208 DRM_COPY_TO_USER_IOCTL((drm_via_mem_t *) data, mem, 210 DRM_COPY_TO_USER_IOCTL((drm_via_mem_t __user *) data, mem,
209 sizeof(mem)); 211 sizeof(mem));
210 return 0; 212 return 0;
211 } 213 }
@@ -289,7 +291,8 @@ int via_mem_free(DRM_IOCTL_ARGS)
289{ 291{
290 drm_via_mem_t mem; 292 drm_via_mem_t mem;
291 293
292 DRM_COPY_FROM_USER_IOCTL(mem, (drm_via_mem_t *) data, sizeof(mem)); 294 DRM_COPY_FROM_USER_IOCTL(mem, (drm_via_mem_t __user *) data,
295 sizeof(mem));
293 296
294 switch (mem.type) { 297 switch (mem.type) {
295 298