summaryrefslogtreecommitdiff
path: root/drivers/xen/gntdev.c
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-03-08 19:56:43 +0300
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-03-10 03:59:19 +0300
commit38eaeb0fd8819dce424a61579500bd9987d5c930 (patch)
treef6852cdbd6262f563a8ced56d5aa8fc0b5c46dec /drivers/xen/gntdev.c
parentdc4972a4e2f3fee1663bd0670dfc4cd798d5f9b2 (diff)
downloadlinux-38eaeb0fd8819dce424a61579500bd9987d5c930.tar.xz
xen: gntdev: fix build warning
addr is actually a virtual address so use an unsigned long. Fixes: CC drivers/xen/gntdev.o drivers/xen/gntdev.c: In function 'map_grant_pages': drivers/xen/gntdev.c:268: warning: cast from pointer to integer of different size Reduce the scope of the variable at the same time. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen/gntdev.c')
-rw-r--r--drivers/xen/gntdev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c
index d43ff3072c99..d96d311b858e 100644
--- a/drivers/xen/gntdev.c
+++ b/drivers/xen/gntdev.c
@@ -257,14 +257,13 @@ static int find_grant_ptes(pte_t *pte, pgtable_t token,
static int map_grant_pages(struct grant_map *map)
{
int i, err = 0;
- phys_addr_t addr;
if (!use_ptemod) {
/* Note: it could already be mapped */
if (map->map_ops[0].handle != -1)
return 0;
for (i = 0; i < map->count; i++) {
- addr = (phys_addr_t)
+ unsigned long addr = (unsigned long)
pfn_to_kaddr(page_to_pfn(map->pages[i]));
gnttab_set_map_op(&map->map_ops[i], addr, map->flags,
map->grants[i].ref,