[PATCH 7/8] KVM: arm64: Mark some header functions as inline

Mark Brown broonie at kernel.org
Wed Feb 5 13:50:30 PST 2025


On Tue, Feb 04, 2025 at 03:20:59PM +0000, Mark Rutland wrote:
> The shared hyp swtich header has a number of static functions which
> might not be used by all files that include the header, and when unused
> they will provoke compiler warnings, e.g.

With at least LLVM 18 we still have some issues with unused statics
arising from the aliased function definitions:

In file included from arch/arm64/kvm/hyp/nvhe/hyp-main.c:8:
./arch/arm64/kvm/hyp/include/hyp/switch.h:699:13: warning: unused function 'kvm_hyp_handle_iabt_low' [-Wunused-function]
  699 | static bool kvm_hyp_handle_iabt_low(struct kvm_vcpu *vcpu, u64 *exit_code)
      |             ^~~~~~~~~~~~~~~~~~~~~~~
./arch/arm64/kvm/hyp/include/hyp/switch.h:701:13: warning: unused function 'kvm_hyp_handle_watchpt_low' [-Wunused-function]
  701 | static bool kvm_hyp_handle_watchpt_low(struct kvm_vcpu *vcpu, u64 *exit_code)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~

The simplest thing would be to expand the alises into simple wrapper
functions but that doesn't feel amazing, I don't know what people's
taste is there?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20250205/98ad5e21/attachment.sig>


More information about the linux-arm-kernel mailing list