]> git.baikalelectronics.ru Git - kernel.git/commit
x86/kvm: Fix compilation warning in non-x86_64 builds
authorLeonardo Bras <leobras@redhat.com>
Fri, 18 Feb 2022 03:41:00 +0000 (00:41 -0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 18 Feb 2022 08:33:45 +0000 (03:33 -0500)
commit5ba812b983f952761adbb1c33a2d5844c76cbadb
tree2aa5b1375358116e232ec631b12627295436432c
parent5e6e40445a8cd5157e078cc5c10cd9983ca607c5
x86/kvm: Fix compilation warning in non-x86_64 builds

On non-x86_64 builds, helpers gtod_is_based_on_tsc() and
kvm_guest_supported_xfd() are defined but never used.  Because these are
static inline but are in a .c file, some compilers do warn for them with
-Wunused-function, which becomes an error if -Werror is present.

Add #ifdef so they are only defined in x86_64 builds.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Leonardo Bras <leobras@redhat.com>
Message-Id: <20220218034100.115702-1-leobras@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c