mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
xen/xenbus: client: Fix call of virt_to_mfn in xenbus_grant_ring
virt_to_mfn should take a void* rather an unsigned long. While it doesn't really matter now, it would throw a compiler warning later when virt_to_mfn will enforce the type. At the same time, avoid to compute new virtual address every time in the loop and directly increment the parameter as we don't use it later. Signed-off-by: Julien Grall <[email protected]> Reviewed-by: David Vrabel <[email protected]> Cc: Wei Liu <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: Boris Ostrovsky <[email protected]> Signed-off-by: David Vrabel <[email protected]>
This commit is contained in:
parent
a9fd60e268
commit
c9fd55eb66
1 changed files with 3 additions and 3 deletions
|
|
@ -379,16 +379,16 @@ int xenbus_grant_ring(struct xenbus_device *dev, void *vaddr,
|
|||
int i, j;
|
||||
|
||||
for (i = 0; i < nr_pages; i++) {
|
||||
unsigned long addr = (unsigned long)vaddr +
|
||||
(PAGE_SIZE * i);
|
||||
err = gnttab_grant_foreign_access(dev->otherend_id,
|
||||
virt_to_mfn(addr), 0);
|
||||
virt_to_mfn(vaddr), 0);
|
||||
if (err < 0) {
|
||||
xenbus_dev_fatal(dev, err,
|
||||
"granting access to ring page");
|
||||
goto fail;
|
||||
}
|
||||
grefs[i] = err;
|
||||
|
||||
vaddr = vaddr + PAGE_SIZE;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue