mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
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>
This commit is contained in:
parent
3825373b91
commit
975bad4bb2
1 changed files with 16 additions and 18 deletions
Loading…
Add table
Add a link
Reference in a new issue