[arm-platforms:kvm-arm64/vcpu-xarray 6/8] include/linux/xarray.h:447:27: error: passing argument 2 of 'xa_find' from incompatible pointer type
kernel test robot
lkp at intel.com
Sun Nov 7 00:19:21 PDT 2021
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git kvm-arm64/vcpu-xarray
head: fc21d44cdf6f70e7a6911050dc09d610752bf0f4
commit: a9553c70596fba73345ba2997e75ff0d0f607bab [6/8] KVM: Convert kvm_for_each_vcpu() to using xa_for_each_range()
config: i386-debian-10.3 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?id=a9553c70596fba73345ba2997e75ff0d0f607bab
git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
git fetch --no-tags arm-platforms kvm-arm64/vcpu-xarray
git checkout a9553c70596fba73345ba2997e75ff0d0f607bab
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/radix-tree.h:19,
from include/linux/fs.h:15,
from include/linux/huge_mm.h:8,
from include/linux/mm.h:717,
from include/linux/kvm_host.h:16,
from arch/x86/kvm/../../../virt/kvm/kvm_main.c:18:
include/linux/kvm_host.h: In function 'kvm_get_vcpu_by_id':
>> include/linux/xarray.h:447:27: error: passing argument 2 of 'xa_find' from incompatible pointer type [-Werror=incompatible-pointer-types]
447 | entry = xa_find(xa, &index, last, XA_PRESENT); \
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
include/linux/kvm_host.h:715:2: note: in expansion of macro 'kvm_for_each_vcpu'
715 | kvm_for_each_vcpu(i, vcpu, kvm)
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:357:7: note: expected 'long unsigned int *' but argument is of type 'int *'
357 | void *xa_find(struct xarray *xa, unsigned long *index,
| ^~~~~~~
>> include/linux/xarray.h:449:33: error: passing argument 2 of 'xa_find_after' from incompatible pointer type [-Werror=incompatible-pointer-types]
449 | entry = xa_find_after(xa, &index, last, XA_PRESENT))
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
include/linux/kvm_host.h:715:2: note: in expansion of macro 'kvm_for_each_vcpu'
715 | kvm_for_each_vcpu(i, vcpu, kvm)
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:359:7: note: expected 'long unsigned int *' but argument is of type 'int *'
359 | void *xa_find_after(struct xarray *xa, unsigned long *index,
| ^~~~~~~~~~~~~
arch/x86/kvm/../../../virt/kvm/kvm_main.c: In function 'kvm_make_all_cpus_request_except':
>> include/linux/xarray.h:447:27: error: passing argument 2 of 'xa_find' from incompatible pointer type [-Werror=incompatible-pointer-types]
447 | entry = xa_find(xa, &index, last, XA_PRESENT); \
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/../../../virt/kvm/kvm_main.c:316:2: note: in expansion of macro 'kvm_for_each_vcpu'
316 | kvm_for_each_vcpu(i, vcpu, kvm) {
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:357:7: note: expected 'long unsigned int *' but argument is of type 'int *'
357 | void *xa_find(struct xarray *xa, unsigned long *index,
| ^~~~~~~
>> include/linux/xarray.h:449:33: error: passing argument 2 of 'xa_find_after' from incompatible pointer type [-Werror=incompatible-pointer-types]
449 | entry = xa_find_after(xa, &index, last, XA_PRESENT))
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/../../../virt/kvm/kvm_main.c:316:2: note: in expansion of macro 'kvm_for_each_vcpu'
316 | kvm_for_each_vcpu(i, vcpu, kvm) {
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:359:7: note: expected 'long unsigned int *' but argument is of type 'int *'
359 | void *xa_find_after(struct xarray *xa, unsigned long *index,
| ^~~~~~~~~~~~~
arch/x86/kvm/../../../virt/kvm/kvm_main.c: In function 'kvm_destroy_vcpus':
>> include/linux/xarray.h:447:27: error: passing argument 2 of 'xa_find' from incompatible pointer type [-Werror=incompatible-pointer-types]
447 | entry = xa_find(xa, &index, last, XA_PRESENT); \
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/../../../virt/kvm/kvm_main.c:459:2: note: in expansion of macro 'kvm_for_each_vcpu'
459 | kvm_for_each_vcpu(i, vcpu, kvm) {
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:357:7: note: expected 'long unsigned int *' but argument is of type 'unsigned int *'
357 | void *xa_find(struct xarray *xa, unsigned long *index,
| ^~~~~~~
>> include/linux/xarray.h:449:33: error: passing argument 2 of 'xa_find_after' from incompatible pointer type [-Werror=incompatible-pointer-types]
449 | entry = xa_find_after(xa, &index, last, XA_PRESENT))
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/../../../virt/kvm/kvm_main.c:459:2: note: in expansion of macro 'kvm_for_each_vcpu'
459 | kvm_for_each_vcpu(i, vcpu, kvm) {
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:359:7: note: expected 'long unsigned int *' but argument is of type 'unsigned int *'
359 | void *xa_find_after(struct xarray *xa, unsigned long *index,
| ^~~~~~~~~~~~~
arch/x86/kvm/../../../virt/kvm/kvm_main.c: In function 'kvm_vcpu_on_spin':
>> include/linux/xarray.h:447:27: error: passing argument 2 of 'xa_find' from incompatible pointer type [-Werror=incompatible-pointer-types]
447 | entry = xa_find(xa, &index, last, XA_PRESENT); \
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/../../../virt/kvm/kvm_main.c:3466:3: note: in expansion of macro 'kvm_for_each_vcpu'
3466 | kvm_for_each_vcpu(i, vcpu, kvm) {
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:357:7: note: expected 'long unsigned int *' but argument is of type 'int *'
357 | void *xa_find(struct xarray *xa, unsigned long *index,
| ^~~~~~~
>> include/linux/xarray.h:449:33: error: passing argument 2 of 'xa_find_after' from incompatible pointer type [-Werror=incompatible-pointer-types]
449 | entry = xa_find_after(xa, &index, last, XA_PRESENT))
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/../../../virt/kvm/kvm_main.c:3466:3: note: in expansion of macro 'kvm_for_each_vcpu'
3466 | kvm_for_each_vcpu(i, vcpu, kvm) {
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:359:7: note: expected 'long unsigned int *' but argument is of type 'int *'
359 | void *xa_find_after(struct xarray *xa, unsigned long *index,
| ^~~~~~~~~~~~~
arch/x86/kvm/../../../virt/kvm/kvm_main.c: In function 'kvm_vm_ioctl_reset_dirty_pages':
>> include/linux/xarray.h:447:27: error: passing argument 2 of 'xa_find' from incompatible pointer type [-Werror=incompatible-pointer-types]
447 | entry = xa_find(xa, &index, last, XA_PRESENT); \
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/../../../virt/kvm/kvm_main.c:4273:2: note: in expansion of macro 'kvm_for_each_vcpu'
4273 | kvm_for_each_vcpu(i, vcpu, kvm)
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:357:7: note: expected 'long unsigned int *' but argument is of type 'int *'
357 | void *xa_find(struct xarray *xa, unsigned long *index,
| ^~~~~~~
>> include/linux/xarray.h:449:33: error: passing argument 2 of 'xa_find_after' from incompatible pointer type [-Werror=incompatible-pointer-types]
449 | entry = xa_find_after(xa, &index, last, XA_PRESENT))
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/../../../virt/kvm/kvm_main.c:4273:2: note: in expansion of macro 'kvm_for_each_vcpu'
4273 | kvm_for_each_vcpu(i, vcpu, kvm)
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:359:7: note: expected 'long unsigned int *' but argument is of type 'int *'
359 | void *xa_find_after(struct xarray *xa, unsigned long *index,
| ^~~~~~~~~~~~~
arch/x86/kvm/../../../virt/kvm/kvm_main.c: In function 'kvm_get_stat_per_vcpu':
>> include/linux/xarray.h:447:27: error: passing argument 2 of 'xa_find' from incompatible pointer type [-Werror=incompatible-pointer-types]
447 | entry = xa_find(xa, &index, last, XA_PRESENT); \
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/../../../virt/kvm/kvm_main.c:5188:2: note: in expansion of macro 'kvm_for_each_vcpu'
5188 | kvm_for_each_vcpu(i, vcpu, kvm)
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:357:7: note: expected 'long unsigned int *' but argument is of type 'int *'
357 | void *xa_find(struct xarray *xa, unsigned long *index,
| ^~~~~~~
>> include/linux/xarray.h:449:33: error: passing argument 2 of 'xa_find_after' from incompatible pointer type [-Werror=incompatible-pointer-types]
449 | entry = xa_find_after(xa, &index, last, XA_PRESENT))
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/../../../virt/kvm/kvm_main.c:5188:2: note: in expansion of macro 'kvm_for_each_vcpu'
5188 | kvm_for_each_vcpu(i, vcpu, kvm)
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:359:7: note: expected 'long unsigned int *' but argument is of type 'int *'
359 | void *xa_find_after(struct xarray *xa, unsigned long *index,
| ^~~~~~~~~~~~~
arch/x86/kvm/../../../virt/kvm/kvm_main.c: In function 'kvm_clear_stat_per_vcpu':
>> include/linux/xarray.h:447:27: error: passing argument 2 of 'xa_find' from incompatible pointer type [-Werror=incompatible-pointer-types]
447 | entry = xa_find(xa, &index, last, XA_PRESENT); \
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/../../../virt/kvm/kvm_main.c:5199:2: note: in expansion of macro 'kvm_for_each_vcpu'
5199 | kvm_for_each_vcpu(i, vcpu, kvm)
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:357:7: note: expected 'long unsigned int *' but argument is of type 'int *'
357 | void *xa_find(struct xarray *xa, unsigned long *index,
| ^~~~~~~
>> include/linux/xarray.h:449:33: error: passing argument 2 of 'xa_find_after' from incompatible pointer type [-Werror=incompatible-pointer-types]
449 | entry = xa_find_after(xa, &index, last, XA_PRESENT))
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/../../../virt/kvm/kvm_main.c:5199:2: note: in expansion of macro 'kvm_for_each_vcpu'
5199 | kvm_for_each_vcpu(i, vcpu, kvm)
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:359:7: note: expected 'long unsigned int *' but argument is of type 'int *'
359 | void *xa_find_after(struct xarray *xa, unsigned long *index,
| ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from include/linux/radix-tree.h:19,
from include/linux/fs.h:15,
from include/linux/huge_mm.h:8,
from include/linux/mm.h:717,
from include/linux/kvm_host.h:16,
from arch/x86/kvm/../../../virt/kvm/coalesced_mmio.c:14:
include/linux/kvm_host.h: In function 'kvm_get_vcpu_by_id':
>> include/linux/xarray.h:447:27: error: passing argument 2 of 'xa_find' from incompatible pointer type [-Werror=incompatible-pointer-types]
447 | entry = xa_find(xa, &index, last, XA_PRESENT); \
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
include/linux/kvm_host.h:715:2: note: in expansion of macro 'kvm_for_each_vcpu'
715 | kvm_for_each_vcpu(i, vcpu, kvm)
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:357:7: note: expected 'long unsigned int *' but argument is of type 'int *'
357 | void *xa_find(struct xarray *xa, unsigned long *index,
| ^~~~~~~
>> include/linux/xarray.h:449:33: error: passing argument 2 of 'xa_find_after' from incompatible pointer type [-Werror=incompatible-pointer-types]
449 | entry = xa_find_after(xa, &index, last, XA_PRESENT))
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
include/linux/kvm_host.h:715:2: note: in expansion of macro 'kvm_for_each_vcpu'
715 | kvm_for_each_vcpu(i, vcpu, kvm)
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:359:7: note: expected 'long unsigned int *' but argument is of type 'int *'
359 | void *xa_find_after(struct xarray *xa, unsigned long *index,
| ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from include/linux/radix-tree.h:19,
from include/linux/fs.h:15,
from include/linux/huge_mm.h:8,
from include/linux/mm.h:717,
from include/linux/kvm_host.h:16,
from arch/x86/kvm/x86.c:19:
include/linux/kvm_host.h: In function 'kvm_get_vcpu_by_id':
>> include/linux/xarray.h:447:27: error: passing argument 2 of 'xa_find' from incompatible pointer type [-Werror=incompatible-pointer-types]
447 | entry = xa_find(xa, &index, last, XA_PRESENT); \
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
include/linux/kvm_host.h:715:2: note: in expansion of macro 'kvm_for_each_vcpu'
715 | kvm_for_each_vcpu(i, vcpu, kvm)
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:357:7: note: expected 'long unsigned int *' but argument is of type 'int *'
357 | void *xa_find(struct xarray *xa, unsigned long *index,
| ^~~~~~~
>> include/linux/xarray.h:449:33: error: passing argument 2 of 'xa_find_after' from incompatible pointer type [-Werror=incompatible-pointer-types]
449 | entry = xa_find_after(xa, &index, last, XA_PRESENT))
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
include/linux/kvm_host.h:715:2: note: in expansion of macro 'kvm_for_each_vcpu'
715 | kvm_for_each_vcpu(i, vcpu, kvm)
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:359:7: note: expected 'long unsigned int *' but argument is of type 'int *'
359 | void *xa_find_after(struct xarray *xa, unsigned long *index,
| ^~~~~~~~~~~~~
In file included from include/linux/radix-tree.h:19,
from include/linux/fs.h:15,
from include/linux/huge_mm.h:8,
from include/linux/mm.h:717,
from include/linux/kvm_host.h:16,
from arch/x86/kvm/x86.c:19:
arch/x86/kvm/x86.c: In function 'kvm_end_pvclock_update':
>> include/linux/xarray.h:447:27: error: passing argument 2 of 'xa_find' from incompatible pointer type [-Werror=incompatible-pointer-types]
447 | entry = xa_find(xa, &index, last, XA_PRESENT); \
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/x86.c:2823:2: note: in expansion of macro 'kvm_for_each_vcpu'
2823 | kvm_for_each_vcpu(i, vcpu, kvm)
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:357:7: note: expected 'long unsigned int *' but argument is of type 'int *'
357 | void *xa_find(struct xarray *xa, unsigned long *index,
| ^~~~~~~
>> include/linux/xarray.h:449:33: error: passing argument 2 of 'xa_find_after' from incompatible pointer type [-Werror=incompatible-pointer-types]
449 | entry = xa_find_after(xa, &index, last, XA_PRESENT))
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/x86.c:2823:2: note: in expansion of macro 'kvm_for_each_vcpu'
2823 | kvm_for_each_vcpu(i, vcpu, kvm)
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:359:7: note: expected 'long unsigned int *' but argument is of type 'int *'
359 | void *xa_find_after(struct xarray *xa, unsigned long *index,
| ^~~~~~~~~~~~~
>> include/linux/xarray.h:447:27: error: passing argument 2 of 'xa_find' from incompatible pointer type [-Werror=incompatible-pointer-types]
447 | entry = xa_find(xa, &index, last, XA_PRESENT); \
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/x86.c:2827:2: note: in expansion of macro 'kvm_for_each_vcpu'
2827 | kvm_for_each_vcpu(i, vcpu, kvm)
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:357:7: note: expected 'long unsigned int *' but argument is of type 'int *'
357 | void *xa_find(struct xarray *xa, unsigned long *index,
| ^~~~~~~
>> include/linux/xarray.h:449:33: error: passing argument 2 of 'xa_find_after' from incompatible pointer type [-Werror=incompatible-pointer-types]
449 | entry = xa_find_after(xa, &index, last, XA_PRESENT))
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/x86.c:2827:2: note: in expansion of macro 'kvm_for_each_vcpu'
2827 | kvm_for_each_vcpu(i, vcpu, kvm)
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:359:7: note: expected 'long unsigned int *' but argument is of type 'int *'
359 | void *xa_find_after(struct xarray *xa, unsigned long *index,
| ^~~~~~~~~~~~~
arch/x86/kvm/x86.c: In function 'kvmclock_update_fn':
>> include/linux/xarray.h:447:27: error: passing argument 2 of 'xa_find' from incompatible pointer type [-Werror=incompatible-pointer-types]
447 | entry = xa_find(xa, &index, last, XA_PRESENT); \
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/x86.c:3075:2: note: in expansion of macro 'kvm_for_each_vcpu'
3075 | kvm_for_each_vcpu(i, vcpu, kvm) {
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:357:7: note: expected 'long unsigned int *' but argument is of type 'int *'
357 | void *xa_find(struct xarray *xa, unsigned long *index,
| ^~~~~~~
>> include/linux/xarray.h:449:33: error: passing argument 2 of 'xa_find_after' from incompatible pointer type [-Werror=incompatible-pointer-types]
449 | entry = xa_find_after(xa, &index, last, XA_PRESENT))
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/x86.c:3075:2: note: in expansion of macro 'kvm_for_each_vcpu'
3075 | kvm_for_each_vcpu(i, vcpu, kvm) {
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:359:7: note: expected 'long unsigned int *' but argument is of type 'int *'
359 | void *xa_find_after(struct xarray *xa, unsigned long *index,
| ^~~~~~~~~~~~~
arch/x86/kvm/x86.c: In function 'kvm_arch_sync_dirty_log':
>> include/linux/xarray.h:447:27: error: passing argument 2 of 'xa_find' from incompatible pointer type [-Werror=incompatible-pointer-types]
447 | entry = xa_find(xa, &index, last, XA_PRESENT); \
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/x86.c:5604:2: note: in expansion of macro 'kvm_for_each_vcpu'
5604 | kvm_for_each_vcpu(i, vcpu, kvm)
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:357:7: note: expected 'long unsigned int *' but argument is of type 'int *'
357 | void *xa_find(struct xarray *xa, unsigned long *index,
| ^~~~~~~
>> include/linux/xarray.h:449:33: error: passing argument 2 of 'xa_find_after' from incompatible pointer type [-Werror=incompatible-pointer-types]
449 | entry = xa_find_after(xa, &index, last, XA_PRESENT))
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/x86.c:5604:2: note: in expansion of macro 'kvm_for_each_vcpu'
5604 | kvm_for_each_vcpu(i, vcpu, kvm)
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:359:7: note: expected 'long unsigned int *' but argument is of type 'int *'
359 | void *xa_find_after(struct xarray *xa, unsigned long *index,
| ^~~~~~~~~~~~~
arch/x86/kvm/x86.c: In function 'kvm_arch_suspend_notifier':
>> include/linux/xarray.h:447:27: error: passing argument 2 of 'xa_find' from incompatible pointer type [-Werror=incompatible-pointer-types]
447 | entry = xa_find(xa, &index, last, XA_PRESENT); \
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/x86.c:5867:2: note: in expansion of macro 'kvm_for_each_vcpu'
5867 | kvm_for_each_vcpu(i, vcpu, kvm) {
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:357:7: note: expected 'long unsigned int *' but argument is of type 'int *'
357 | void *xa_find(struct xarray *xa, unsigned long *index,
| ^~~~~~~
>> include/linux/xarray.h:449:33: error: passing argument 2 of 'xa_find_after' from incompatible pointer type [-Werror=incompatible-pointer-types]
449 | entry = xa_find_after(xa, &index, last, XA_PRESENT))
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/x86.c:5867:2: note: in expansion of macro 'kvm_for_each_vcpu'
5867 | kvm_for_each_vcpu(i, vcpu, kvm) {
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:359:7: note: expected 'long unsigned int *' but argument is of type 'int *'
359 | void *xa_find_after(struct xarray *xa, unsigned long *index,
| ^~~~~~~~~~~~~
arch/x86/kvm/x86.c: In function '__kvmclock_cpufreq_notifier':
>> include/linux/xarray.h:447:27: error: passing argument 2 of 'xa_find' from incompatible pointer type [-Werror=incompatible-pointer-types]
447 | entry = xa_find(xa, &index, last, XA_PRESENT); \
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/x86.c:8333:3: note: in expansion of macro 'kvm_for_each_vcpu'
8333 | kvm_for_each_vcpu(i, vcpu, kvm) {
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:357:7: note: expected 'long unsigned int *' but argument is of type 'int *'
357 | void *xa_find(struct xarray *xa, unsigned long *index,
| ^~~~~~~
>> include/linux/xarray.h:449:33: error: passing argument 2 of 'xa_find_after' from incompatible pointer type [-Werror=incompatible-pointer-types]
449 | entry = xa_find_after(xa, &index, last, XA_PRESENT))
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/x86.c:8333:3: note: in expansion of macro 'kvm_for_each_vcpu'
8333 | kvm_for_each_vcpu(i, vcpu, kvm) {
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:359:7: note: expected 'long unsigned int *' but argument is of type 'int *'
359 | void *xa_find_after(struct xarray *xa, unsigned long *index,
| ^~~~~~~~~~~~~
arch/x86/kvm/x86.c: In function 'kvm_arch_hardware_enable':
>> include/linux/xarray.h:447:27: error: passing argument 2 of 'xa_find' from incompatible pointer type [-Werror=incompatible-pointer-types]
447 | entry = xa_find(xa, &index, last, XA_PRESENT); \
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/x86.c:11056:3: note: in expansion of macro 'kvm_for_each_vcpu'
11056 | kvm_for_each_vcpu(i, vcpu, kvm) {
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:357:7: note: expected 'long unsigned int *' but argument is of type 'int *'
357 | void *xa_find(struct xarray *xa, unsigned long *index,
| ^~~~~~~
>> include/linux/xarray.h:449:33: error: passing argument 2 of 'xa_find_after' from incompatible pointer type [-Werror=incompatible-pointer-types]
449 | entry = xa_find_after(xa, &index, last, XA_PRESENT))
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/x86.c:11056:3: note: in expansion of macro 'kvm_for_each_vcpu'
11056 | kvm_for_each_vcpu(i, vcpu, kvm) {
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:359:7: note: expected 'long unsigned int *' but argument is of type 'int *'
359 | void *xa_find_after(struct xarray *xa, unsigned long *index,
| ^~~~~~~~~~~~~
>> include/linux/xarray.h:447:27: error: passing argument 2 of 'xa_find' from incompatible pointer type [-Werror=incompatible-pointer-types]
447 | entry = xa_find(xa, &index, last, XA_PRESENT); \
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/x86.c:11109:4: note: in expansion of macro 'kvm_for_each_vcpu'
11109 | kvm_for_each_vcpu(i, vcpu, kvm) {
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:357:7: note: expected 'long unsigned int *' but argument is of type 'int *'
357 | void *xa_find(struct xarray *xa, unsigned long *index,
| ^~~~~~~
>> include/linux/xarray.h:449:33: error: passing argument 2 of 'xa_find_after' from incompatible pointer type [-Werror=incompatible-pointer-types]
449 | entry = xa_find_after(xa, &index, last, XA_PRESENT))
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/x86.c:11109:4: note: in expansion of macro 'kvm_for_each_vcpu'
11109 | kvm_for_each_vcpu(i, vcpu, kvm) {
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:359:7: note: expected 'long unsigned int *' but argument is of type 'int *'
359 | void *xa_find_after(struct xarray *xa, unsigned long *index,
| ^~~~~~~~~~~~~
arch/x86/kvm/x86.c: In function 'kvm_free_vcpus':
>> include/linux/xarray.h:447:27: error: passing argument 2 of 'xa_find' from incompatible pointer type [-Werror=incompatible-pointer-types]
447 | entry = xa_find(xa, &index, last, XA_PRESENT); \
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/x86.c:11301:2: note: in expansion of macro 'kvm_for_each_vcpu'
11301 | kvm_for_each_vcpu(i, vcpu, kvm) {
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:357:7: note: expected 'long unsigned int *' but argument is of type 'unsigned int *'
357 | void *xa_find(struct xarray *xa, unsigned long *index,
| ^~~~~~~
>> include/linux/xarray.h:449:33: error: passing argument 2 of 'xa_find_after' from incompatible pointer type [-Werror=incompatible-pointer-types]
449 | entry = xa_find_after(xa, &index, last, XA_PRESENT))
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/x86.c:11301:2: note: in expansion of macro 'kvm_for_each_vcpu'
11301 | kvm_for_each_vcpu(i, vcpu, kvm) {
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:359:7: note: expected 'long unsigned int *' but argument is of type 'unsigned int *'
359 | void *xa_find_after(struct xarray *xa, unsigned long *index,
| ^~~~~~~~~~~~~
arch/x86/kvm/x86.c: In function 'kvm_arch_memslots_updated':
include/linux/xarray.h:447:27: error: passing argument 2 of 'xa_find' from incompatible pointer type [-Werror=incompatible-pointer-types]
447 | entry = xa_find(xa, &index, last, XA_PRESENT); \
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/x86.c:11550:2: note: in expansion of macro 'kvm_for_each_vcpu'
11550 | kvm_for_each_vcpu(i, vcpu, kvm)
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:357:7: note: expected 'long unsigned int *' but argument is of type 'int *'
357 | void *xa_find(struct xarray *xa, unsigned long *index,
| ^~~~~~~
include/linux/xarray.h:449:33: error: passing argument 2 of 'xa_find_after' from incompatible pointer type [-Werror=incompatible-pointer-types]
449 | entry = xa_find_after(xa, &index, last, XA_PRESENT))
include/linux/kvm_host.h:701:2: note: in expansion of macro 'xa_for_each_range'
701 | xa_for_each_range(&kvm->vcpu_array, idx, vcpup, 0, \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/x86.c:11550:2: note: in expansion of macro 'kvm_for_each_vcpu'
11550 | kvm_for_each_vcpu(i, vcpu, kvm)
| ^~~~~~~~~~~~~~~~~
include/linux/xarray.h:359:7: note: expected 'long unsigned int *' but argument is of type 'int *'
359 | void *xa_find_after(struct xarray *xa, unsigned long *index,
| ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
..
vim +/xa_find +447 include/linux/xarray.h
9b89a035514468 Matthew Wilcox 2017-11-10 420
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 421) /**
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 422) * xa_for_each_range() - Iterate over a portion of an XArray.
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 423) * @xa: XArray.
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 424) * @index: Index of @entry.
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 425) * @entry: Entry retrieved from array.
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 426) * @start: First index to retrieve from array.
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 427) * @last: Last index to retrieve from array.
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 428) *
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 429) * During the iteration, @entry will have the value of the entry stored
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 430) * in @xa at @index. You may modify @index during the iteration if you
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 431) * want to skip or reprocess indices. It is safe to modify the array
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 432) * during the iteration. At the end of the iteration, @entry will be set
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 433) * to NULL and @index will have a value less than or equal to max.
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 434) *
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 435) * xa_for_each_range() is O(n.log(n)) while xas_for_each() is O(n). You have
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 436) * to handle your own locking with xas_for_each(), and if you have to unlock
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 437) * after each iteration, it will also end up being O(n.log(n)).
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 438) * xa_for_each_range() will spin if it hits a retry entry; if you intend to
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 439) * see retry entries, you should use the xas_for_each() iterator instead.
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 440) * The xas_for_each() iterator will expand into more inline code than
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 441) * xa_for_each_range().
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 442) *
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 443) * Context: Any context. Takes and releases the RCU lock.
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 444) */
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 445) #define xa_for_each_range(xa, index, entry, start, last) \
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 446) for (index = start, \
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 @447) entry = xa_find(xa, &index, last, XA_PRESENT); \
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 448) entry; \
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 @449) entry = xa_find_after(xa, &index, last, XA_PRESENT))
00ed452c210a0b Matthew Wilcox (Oracle 2020-01-12 450)
:::::: The code at line 447 was first introduced by commit
:::::: 00ed452c210a0bc1ff3ee79e1ce6b199f00a0638 XArray: Add xa_for_each_range
:::::: TO: Matthew Wilcox (Oracle) <willy at infradead.org>
:::::: CC: Matthew Wilcox (Oracle) <willy at infradead.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 34201 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20211107/65b9c99c/attachment-0001.gz>
More information about the linux-arm-kernel
mailing list