Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

vhost: better variable name in logging

We really store a page offset in write_address,
so rename it write_page to avoid confusion.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

+4 -4
+4 -4
drivers/vhost/vhost.c
··· 882 882 static int log_write(void __user *log_base, 883 883 u64 write_address, u64 write_length) 884 884 { 885 + u64 write_page = write_address / VHOST_PAGE_SIZE; 885 886 int r; 886 887 if (!write_length) 887 888 return 0; 888 889 write_length += write_address % VHOST_PAGE_SIZE; 889 - write_address /= VHOST_PAGE_SIZE; 890 890 for (;;) { 891 891 u64 base = (u64)(unsigned long)log_base; 892 - u64 log = base + write_address / 8; 893 - int bit = write_address % 8; 892 + u64 log = base + write_page / 8; 893 + int bit = write_page % 8; 894 894 if ((u64)(unsigned long)log != log) 895 895 return -EFAULT; 896 896 r = set_bit_to_user(bit, (void __user *)(unsigned long)log); ··· 899 899 if (write_length <= VHOST_PAGE_SIZE) 900 900 break; 901 901 write_length -= VHOST_PAGE_SIZE; 902 - write_address += 1; 902 + write_page += 1; 903 903 } 904 904 return r; 905 905 }