]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MMU: mark role_regs and role accessors as maybe unused
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 6 Sep 2021 09:52:23 +0000 (05:52 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 6 Sep 2021 10:56:38 +0000 (06:56 -0400)
commit9dfeb89c5eabb75672ea4e57db52ec5bb0b2c161
tree3a8b23384b8235a14e5b5225d7d817fb9ee355b9
parent0017e56552db8f70b36344c36d0ea6054499ae80
KVM: MMU: mark role_regs and role accessors as maybe unused

It is reasonable for these functions to be used only in some configurations,
for example only if the host is 64-bits (and therefore supports 64-bit
guests).  It is also reasonable to keep the role_regs and role accessors
in sync even though some of the accessors may be used only for one of the
two sets (as is the case currently for CR4.LA57)..

Because clang reports warnings for unused inlines declared in a .c file,
mark both sets of accessors as __maybe_unused.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c