x86: fix sparse warning in mtrr/generic.c
[safe/jmp/linux-2.6] / arch / x86 / kernel / cpu / mtrr / generic.c
index 74ec2ea..0625d41 100644 (file)
@@ -90,7 +90,7 @@ u8 mtrr_type_lookup(u64 start, u64 end)
         * Look of multiple ranges matching this address and pick type
         * as per MTRR precedence
         */
-       if (!mtrr_state.enabled & 2) {
+       if (!(mtrr_state.enabled & 2)) {
                return mtrr_state.def_type;
        }
 
@@ -213,12 +213,12 @@ void __init get_mtrr_state(void)
        mtrr_state.enabled = (lo & 0xc00) >> 10;
 
        if (amd_special_default_mtrr()) {
-               unsigned lo, hi;
+               unsigned low, high;
                /* TOP_MEM2 */
-               rdmsr(MSR_K8_TOP_MEM2, lo, hi);
-               tom2 = hi;
+               rdmsr(MSR_K8_TOP_MEM2, low, high);
+               tom2 = high;
                tom2 <<= 32;
-               tom2 |= lo;
+               tom2 |= low;
                tom2 &= 0xffffff8000000ULL;
        }
        if (mtrr_show) {
@@ -251,8 +251,10 @@ void __init get_mtrr_state(void)
                        else
                                printk(KERN_INFO "MTRR %u disabled\n", i);
                }
-               if (tom2)
-                       printk(KERN_INFO "TOM2: %016lx aka %ldM\n", tom2, tom2>>20);
+               if (tom2) {
+                       printk(KERN_INFO "TOM2: %016llx aka %lldM\n",
+                                         tom2, tom2>>20);
+               }
        }
        mtrr_state_set = 1;