[kvm:master 9/11] arch/x86/kvm/x86.c:7499:3: note: in expansion of macro 'if'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git master
head:   73917739334c6509833b0403b81d4a04a8784bdf
commit: f0d648bdf0a5bbc91da6099d5282f77996558ea4 [9/11] KVM: x86: map/unmap private slots in __x86_set_memory_region
config: i386-randconfig-x000-10121721 (attached as .config)
reproduce:
        git checkout f0d648bdf0a5bbc91da6099d5282f77996558ea4
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/kvm_host.h:9,
                    from arch/x86/kvm/x86.c:22:
   arch/x86/kvm/x86.c: In function '__x86_set_memory_region':
   arch/x86/kvm/x86.c:7499:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      if (IS_ERR((void *)hva))
                 ^
   include/linux/compiler.h:147:28: note: in definition of macro '__trace_if'
     if (__builtin_constant_p((cond)) ? !!(cond) :   \
                               ^
>> arch/x86/kvm/x86.c:7499:3: note: in expansion of macro 'if'
      if (IS_ERR((void *)hva))
      ^
   arch/x86/kvm/x86.c:7499:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      if (IS_ERR((void *)hva))
                 ^
   include/linux/compiler.h:147:40: note: in definition of macro '__trace_if'
     if (__builtin_constant_p((cond)) ? !!(cond) :   \
                                           ^
>> arch/x86/kvm/x86.c:7499:3: note: in expansion of macro 'if'
      if (IS_ERR((void *)hva))
      ^
   arch/x86/kvm/x86.c:7499:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      if (IS_ERR((void *)hva))
                 ^
   include/linux/compiler.h:158:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^
>> arch/x86/kvm/x86.c:7499:3: note: in expansion of macro 'if'
      if (IS_ERR((void *)hva))
      ^
   arch/x86/kvm/x86.c:7500:19: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
       return PTR_ERR((void *)hva);
                      ^

vim +/if +7499 arch/x86/kvm/x86.c

  7483	
  7484		/* Called with kvm->slots_lock held.  */
  7485		if (WARN_ON(id >= KVM_MEM_SLOTS_NUM))
  7486			return -EINVAL;
  7487	
  7488		slot = id_to_memslot(slots, id);
  7489		if (size) {
  7490			if (WARN_ON(slot->npages))
  7491				return -EEXIST;
  7492	
  7493			/*
  7494			 * MAP_SHARED to prevent internal slot pages from being moved
  7495			 * by fork()/COW.
  7496			 */
  7497			hva = vm_mmap(NULL, 0, size, PROT_READ | PROT_WRITE,
  7498				      MAP_SHARED | MAP_ANONYMOUS, 0);
> 7499			if (IS_ERR((void *)hva))
  7500				return PTR_ERR((void *)hva);
  7501		} else {
  7502			if (!slot->npages)
  7503				return 0;
  7504	
  7505			hva = 0;
  7506		}
  7507	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: Binary data


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux