aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/vhost
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2010-11-29 03:22:10 -0500
committerMichael S. Tsirkin <mst@redhat.com>2010-12-09 09:00:10 -0500
commit28831ee60b79bed50958c9cb0d2e76cdc98406f9 (patch)
tree424185751ce16ac30d6374a6aed3d50dc17a924d /drivers/vhost
parent3bf9be40ff76b6df136f14a497167c116b2b3c53 (diff)
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>
Diffstat (limited to 'drivers/vhost')
-rw-r--r--drivers/vhost/vhost.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 4c256d15c249..38244f59cdd9 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -882,15 +882,15 @@ static int set_bit_to_user(int nr, void __user *addr)
882static int log_write(void __user *log_base, 882static int log_write(void __user *log_base,
883 u64 write_address, u64 write_length) 883 u64 write_address, u64 write_length)
884{ 884{
885 u64 write_page = write_address / VHOST_PAGE_SIZE;
885 int r; 886 int r;
886 if (!write_length) 887 if (!write_length)
887 return 0; 888 return 0;
888 write_length += write_address % VHOST_PAGE_SIZE; 889 write_length += write_address % VHOST_PAGE_SIZE;
889 write_address /= VHOST_PAGE_SIZE;
890 for (;;) { 890 for (;;) {
891 u64 base = (u64)(unsigned long)log_base; 891 u64 base = (u64)(unsigned long)log_base;
892 u64 log = base + write_address / 8; 892 u64 log = base + write_page / 8;
893 int bit = write_address % 8; 893 int bit = write_page % 8;
894 if ((u64)(unsigned long)log != log) 894 if ((u64)(unsigned long)log != log)
895 return -EFAULT; 895 return -EFAULT;
896 r = set_bit_to_user(bit, (void __user *)(unsigned long)log); 896 r = set_bit_to_user(bit, (void __user *)(unsigned long)log);
@@ -899,7 +899,7 @@ static int log_write(void __user *log_base,
899 if (write_length <= VHOST_PAGE_SIZE) 899 if (write_length <= VHOST_PAGE_SIZE)
900 break; 900 break;
901 write_length -= VHOST_PAGE_SIZE; 901 write_length -= VHOST_PAGE_SIZE;
902 write_address += 1; 902 write_page += 1;
903 } 903 }
904 return r; 904 return r;
905} 905}