Hi Jason,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net/master]

url:    
https://github.com/0day-ci/linux/commits/Jason-Wang/vhost-don-t-use-kmap-to-log-dirty-pages/20190514-052319
config: i386-randconfig-x005-201919 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <[email protected]>

All warnings (new ones prefixed by >>):

   drivers//vhost/vhost.c: In function 'log_write':
>> drivers//vhost/vhost.c:1734:29: warning: cast from pointer to integer of 
>> different size [-Wpointer-to-int-cast]
     log_base = (void __user *)((u64)log_base & ~0x3ULL);
                                ^
>> drivers//vhost/vhost.c:1734:13: warning: cast to pointer from integer of 
>> different size [-Wint-to-pointer-cast]
     log_base = (void __user *)((u64)log_base & ~0x3ULL);
                ^
   drivers//vhost/vhost.c:1735:17: warning: cast from pointer to integer of 
different size [-Wpointer-to-int-cast]
     write_page += ((u64)log_base & 0x3ULL) * 8;
                    ^

vim +1734 drivers//vhost/vhost.c

  1724  
  1725  static int log_write(void __user *log_base,
  1726                       u64 write_address, u64 write_length)
  1727  {
  1728          u64 write_page = write_address / VHOST_PAGE_SIZE;
  1729          int r;
  1730  
  1731          if (!write_length)
  1732                  return 0;
  1733          write_length += write_address % VHOST_PAGE_SIZE;
> 1734          log_base = (void __user *)((u64)log_base & ~0x3ULL);
  1735          write_page += ((u64)log_base & 0x3ULL) * 8;
  1736          for (;;) {
  1737                  u32 __user *log = (u32 __user *)log_base + write_page / 
32;
  1738                  int bit = write_page % 32;
  1739  
  1740                  r = set_bit_to_user(bit, log);
  1741                  if (r < 0)
  1742                          return r;
  1743                  if (write_length <= VHOST_PAGE_SIZE)
  1744                          break;
  1745                  write_length -= VHOST_PAGE_SIZE;
  1746                  write_page += 1;
  1747          }
  1748          return r;
  1749  }
  1750  

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

Attachment: .config.gz
Description: application/gzip

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Reply via email to