[PATCH] kvm: x86: kvm_emulate_wbinvd_noskip should be static

2015-09-27 Thread Geliang Tang
Fixes the following sparse warning: arch/x86/kvm/x86.c:4492:5: warning: symbol 'kvm_emulate_wbinvd_noskip' was not declared. Should it be static? Signed-off-by: Geliang Tang <geliangt...@163.com> --- arch/x86/kvm/x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ar

[PATCH 2/4] KVM: x86: use list_for_each_entry*

2016-01-01 Thread Geliang Tang
Use list_for_each_entry*() instead of list_for_each*() to simplify the code. Signed-off-by: Geliang Tang <geliangt...@163.com> --- arch/x86/kvm/assigned-dev.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/arch/x86/kvm/assigned-dev.c b/arch/x86/kvm/as

[PATCH 1/4] KVM: use list_for_each_entry_safe

2016-01-01 Thread Geliang Tang
Use list_for_each_entry_safe() instead of list_for_each_safe() to simplify the code. Signed-off-by: Geliang Tang <geliangt...@163.com> --- virt/kvm/kvm_main.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 4

[PATCH 3/4] KVM: x86: use list_last_entry

2016-01-01 Thread Geliang Tang
To make the intention clearer, use list_last_entry instead of list_entry. Signed-off-by: Geliang Tang <geliangt...@163.com> --- arch/x86/kvm/mmu.c | 4 ++-- arch/x86/kvm/vmx.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c

[PATCH 4/4] KVM: async_pf: use list_first_entry

2016-01-01 Thread Geliang Tang
To make the intention clearer, use list_first_entry instead of list_entry. Signed-off-by: Geliang Tang <geliangt...@163.com> --- virt/kvm/async_pf.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/virt/kvm/async_pf.c b/virt/kvm/async_pf.c index 77d42be..62c4857

[PATCH] virtio/s390: use dev_to_virtio

2015-12-30 Thread Geliang Tang
Use dev_to_virtio() instead of open-coding it. Signed-off-by: Geliang Tang <geliangt...@163.com> --- drivers/s390/virtio/virtio_ccw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/s390/virtio/virtio_ccw.c b/drivers/s390/virtio/virtio_ccw.c index 1b83159..9

[PATCH 5/7] vfio: fix a problematic usage of WARN()

2015-11-25 Thread Geliang Tang
WARN() takes a condition and a format string. The condition was omitted. So I added it. Signed-off-by: Geliang Tang <geliangt...@163.com> --- drivers/vfio/vfio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c index de632da..9