]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: avoid unused variable warning for UP builds
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 30 Jun 2017 11:25:45 +0000 (13:25 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 10 Jul 2017 12:44:07 +0000 (14:44 +0200)
commitb49defe83659cefbb1763d541e779da32594ab10
tree174dc13e0ba46fb21e827f407fae1970fc0e7564
parentaf3c8d98508d37541d4bf57f13a984a7f73a328c
kvm: avoid unused variable warning for UP builds

The uniprocessor version of smp_call_function_many does not evaluate
all of its argument, and the compiler emits a warning about "wait"
being unused.  This breaks the build on architectures for which
"-Werror" is enabled by default.

Work around it by moving the invocation of smp_call_function_many to
its own inline function.

Reported-by: Paul Mackerras <paulus@ozlabs.org>
Cc: stable@vger.kernel.org
Fixes: 7a97cec26b94c909f4cbad2dc3186af3e457a522
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virt/kvm/kvm_main.c