]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: arm64: Initialize struct kvm_s2_fault completely at declaration
authorFuad Tabba <tabba@google.com>
Fri, 6 Mar 2026 14:02:29 +0000 (14:02 +0000)
committerMarc Zyngier <maz@kernel.org>
Sat, 28 Mar 2026 11:29:40 +0000 (11:29 +0000)
commit975bad4bb21e4eea7ecc0f32f4cbbb91a9c8d48f
tree061661b653c750e2ac9603d57c1ecf8915df4989
parent3825373b91b0fbedc65205a59f95379aaf596aad
KVM: arm64: Initialize struct kvm_s2_fault completely at declaration

Simplify the initialization of struct kvm_s2_fault in user_mem_abort().

Instead of partially initializing the struct via designated initializers
and then sequentially assigning the remaining fields (like write_fault
and topup_memcache) further down the function, evaluate those
dependencies upfront.

This allows the entire struct to be fully initialized at declaration. It
also eliminates the need for the intermediate fault_data variable and
its associated fault pointer, reducing boilerplate.

Signed-off-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/mmu.c