xen-gntdev: Add cast to pointer
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>
Wed, 23 Feb 2011 13:11:36 +0000 (08:11 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 23 Feb 2011 15:10:34 +0000 (10:10 -0500)
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/gntdev.c

index cdc28dc8b5d966d848dfe6c0b48efa95225698da..d43ff3072c99ea62e49dba1f4a84fbd1e341017e 100644 (file)
@@ -298,8 +298,8 @@ static int __unmap_grant_pages(struct grant_map *map, int offset, int pages)
        if (map->notify.flags & UNMAP_NOTIFY_CLEAR_BYTE) {
                int pgno = (map->notify.addr >> PAGE_SHIFT);
                if (pgno >= offset && pgno < offset + pages && use_ptemod) {
-                       void __user *tmp;
-                       tmp = map->vma->vm_start + map->notify.addr;
+                       void __user *tmp = (void __user *)
+                               map->vma->vm_start + map->notify.addr;
                        err = copy_to_user(tmp, &err, 1);
                        if (err)
                                return err;