[PATCH] simplify pdpte check

Muli Ben-Yehuda
2007-02-01T14:01:38Z

Small cleanup: we check (pdpte & 1) && (pdpte & constant). Instead
just check (pdpte & (constant | 1)).

Signed-off-by: Muli Ben-Yehuda <muli-7z/5BgaJwgfQT0dZR+AlfA@public.gmane.org>

Index: kernel/kvm_main.c
===================================================================
--- kernel/kvm_main.c (revision 4379)
+++ kernel/kvm_main.c (working copy)
@@ -336,7 +336,7 @@
ret = 1;
for (i = 0; i < 4; ++i) {
pdpte = pdpt[offset + i];
- if ((pdpte & 1) && (pdpte & 0xfffffff0000001e6ull)) {
+ if (pdpte & 0xfffffff0000001e7ull) {
ret = 0;
goto out;
}