diff options
author | Sean Christopherson <sean.j.christopherson@intel.com> | 2020-02-18 13:07:28 -0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-03-16 17:57:23 +0100 |
commit | 163da372dec52183a4f6142c302716b939ec5df5 (patch) | |
tree | 545dcde22a42b9f735837f833b3a9bba4e4a271b /tools/io_uring/syscall.c | |
parent | e96c81ee89d80e1a0fe50a0e9be40c1b77e14aaa (diff) |
KVM: Clean up local variable usage in __kvm_set_memory_region()
Clean up __kvm_set_memory_region() to achieve several goals:
- Remove local variables that serve no real purpose
- Improve the readability of the code
- Better show the relationship between the 'old' and 'new' memslot
- Prepare for dynamically sizing memslots
- Document subtle gotchas (via comments)
Note, using 'tmp' to hold the initial memslot is not strictly necessary
at this juncture, e.g. 'old' could be directly copied from
id_to_memslot(), but keep the pointer usage as id_to_memslot() will be
able to return a NULL pointer once memslots are dynamically sized.
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/io_uring/syscall.c')
0 files changed, 0 insertions, 0 deletions