]> git.baikalelectronics.ru Git - kernel.git/commit
x86/kvm/vmx: Simplify segment_base()
authorAndy Lutomirski <luto@kernel.org>
Mon, 20 Feb 2017 16:56:12 +0000 (08:56 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 21 Feb 2017 10:48:56 +0000 (11:48 +0100)
commitd4a308598b4f0dfc53ee3b1226b5b5c604907ed2
tree4960eb70e39c81d6e23fb5c413315235dd339d1e
parent1a795aad0a382044fb30b660693a64c96df01699
x86/kvm/vmx: Simplify segment_base()

Use actual pointer types for pointers (instead of unsigned long) and
replace hardcoded constants with the appropriate self-documenting
macros.

The function is still a bit messy, but this seems a lot better than
before to me.

This is mostly borrowed from a patch by Thomas Garnier.

Cc: Thomas Garnier <thgarnie@google.com>
Cc: Jim Mattson <jmattson@google.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx.c