lkml.org 
[lkml]   [2021]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    Subject[PATCH 01/15] KVM: selftests: Explicitly state indicies for vm_guest_mode_params array
    From
    Explicitly state the indices when populating vm_guest_mode_params to
    make it marginally easier to visualize what's going on.

    No functional change intended.

    Signed-off-by: Sean Christopherson <seanjc@google.com>
    ---
    tools/testing/selftests/kvm/lib/kvm_util.c | 14 +++++++-------
    1 file changed, 7 insertions(+), 7 deletions(-)

    diff --git a/tools/testing/selftests/kvm/lib/kvm_util.c b/tools/testing/selftests/kvm/lib/kvm_util.c
    index d787cb802b4a..960f4c5129ff 100644
    --- a/tools/testing/selftests/kvm/lib/kvm_util.c
    +++ b/tools/testing/selftests/kvm/lib/kvm_util.c
    @@ -154,13 +154,13 @@ _Static_assert(sizeof(vm_guest_mode_string)/sizeof(char *) == NUM_VM_MODES,
    "Missing new mode strings?");

    const struct vm_guest_mode_params vm_guest_mode_params[] = {
    - { 52, 48, 0x1000, 12 },
    - { 52, 48, 0x10000, 16 },
    - { 48, 48, 0x1000, 12 },
    - { 48, 48, 0x10000, 16 },
    - { 40, 48, 0x1000, 12 },
    - { 40, 48, 0x10000, 16 },
    - { 0, 0, 0x1000, 12 },
    + [VM_MODE_P52V48_4K] = { 52, 48, 0x1000, 12 },
    + [VM_MODE_P52V48_64K] = { 52, 48, 0x10000, 16 },
    + [VM_MODE_P48V48_4K] = { 48, 48, 0x1000, 12 },
    + [VM_MODE_P48V48_64K] = { 48, 48, 0x10000, 16 },
    + [VM_MODE_P40V48_4K] = { 40, 48, 0x1000, 12 },
    + [VM_MODE_P40V48_64K] = { 40, 48, 0x10000, 16 },
    + [VM_MODE_PXXV48_4K] = { 0, 0, 0x1000, 12 },
    };
    _Static_assert(sizeof(vm_guest_mode_params)/sizeof(struct vm_guest_mode_params) == NUM_VM_MODES,
    "Missing new mode params?");
    --
    2.30.0.478.g8a0d178c01-goog
    \
     
     \ /
      Last update: 2021-02-11 00:09    [W:4.033 / U:0.180 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site