diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2007-07-30 16:41:57 +1000 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-10-13 10:18:21 +0200 |
commit | 3077c4513c46f66537c1205acc464e49c9847dc0 (patch) | |
tree | c259f223d6815528d357b338c4915783ebc8c8ac /drivers/kvm/kvm_main.c | |
parent | 8b9cf98cc7ea7354d6d4cbc4ffdb18a26a1129d3 (diff) | |
download | lwn-3077c4513c46f66537c1205acc464e49c9847dc0.tar.gz lwn-3077c4513c46f66537c1205acc464e49c9847dc0.zip |
KVM: Remove three magic numbers
There are several places where hardcoded numbers are used in place of
the easily-available constant, which is poor form.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm_main.c')
-rw-r--r-- | drivers/kvm/kvm_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index 5b42731beba4..6ad1b04f3099 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c @@ -413,7 +413,7 @@ static void free_pio_guest_pages(struct kvm_vcpu *vcpu) { int i; - for (i = 0; i < 2; ++i) + for (i = 0; i < ARRAY_SIZE(vcpu->pio.guest_pages); ++i) if (vcpu->pio.guest_pages[i]) { __free_page(vcpu->pio.guest_pages[i]); vcpu->pio.guest_pages[i] = NULL; |