Skip to content

Commit

Permalink
drm: fix warning on 64-bit platforms..
Browse files Browse the repository at this point in the history
This looks ugly, but it is the only thing that makes sense that doesn't
change the API.

Signed-off-by: Dave Airlie <airlied@linux.ie>
  • Loading branch information
Dave Airlie authored and Dave Airlie committed Oct 24, 2005
1 parent 5fb4dc9 commit 67e1a01
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/char/drm/drm_bufs.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,9 @@ int drm_addmap_ioctl(struct inode *inode, struct file *filp,

if (copy_to_user(argp, maplist->map, sizeof(drm_map_t)))
return -EFAULT;
if (put_user((void *)maplist->user_token, &argp->handle))

/* avoid a warning on 64-bit, this casting isn't very nice, but the API is set so too late */
if (put_user((void *)(unsigned long)maplist->user_token, &argp->handle))
return -EFAULT;
return 0;
}
Expand Down

0 comments on commit 67e1a01

Please sign in to comment.