Hi Jason,

[auto build test WARNING on vhost/linux-next]
[also build test WARNING on v4.9 next-20161214]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:    
https://github.com/0day-ci/linux/commits/Jason-Wang/vhost-introduce-O-1-vq-metadata-cache/20161214-160153
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next
config: i386-randconfig-x005-201650 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/vhost/vhost.c: In function 'vhost_vq_meta_fetch':
>> drivers/vhost/vhost.c:719:9: warning: cast to pointer from integer of 
>> different size [-Wint-to-pointer-cast]
     return (void *)(node->userspace_addr + (u64)addr - node->start);
            ^

vim +719 drivers/vhost/vhost.c

   703                                                     node->start,
   704                                                     node->size))
   705                          return 0;
   706          }
   707          return 1;
   708  }
   709  
   710  static inline void __user *vhost_vq_meta_fetch(struct vhost_virtqueue 
*vq,
   711                                                 u64 addr, unsigned int 
size,
   712                                                 int type)
   713  {
   714          const struct vhost_umem_node *node = vq->meta_iotlb[type];
   715  
   716          if (!node)
   717                  return NULL;
   718  
 > 719          return (void *)(node->userspace_addr + (u64)addr - node->start);
   720  }
   721  
   722  /* Can we switch to this memory table? */
   723  /* Caller should have device mutex but not vq mutex */
   724  static int memory_access_ok(struct vhost_dev *d, struct vhost_umem 
*umem,
   725                              int log_all)
   726  {
   727          int i;

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

Attachment: .config.gz
Description: application/gzip

Reply via email to