]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] Fix warning in powernow-k8.c
authorBrian Gerst <bgerst@didntduck.org>
Wed, 27 Jul 2005 18:43:57 +0000 (11:43 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 27 Jul 2005 23:25:54 +0000 (16:25 -0700)
powernow-k8.c: In function `query_current_values_with_pending_wait':
powernow-k8.c:110: warning: `hi' may be used uninitialized in this function

Signed-off-by: Brian Gerst <bgerst@didntduck.org>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/kernel/cpu/cpufreq/powernow-k8.c

index 10cc096c0adead9961f48bd79a865f317ce8f27a..31f65c8a4c24a000fe8c5663fe594687306d73c2 100644 (file)
@@ -110,14 +110,13 @@ static int query_current_values_with_pending_wait(struct powernow_k8_data *data)
        u32 lo, hi;
        u32 i = 0;
 
-       lo = MSR_S_LO_CHANGE_PENDING;
-       while (lo & MSR_S_LO_CHANGE_PENDING) {
+       do {
                if (i++ > 0x1000000) {
                        printk(KERN_ERR PFX "detected change pending stuck\n");
                        return 1;
                }
                rdmsr(MSR_FIDVID_STATUS, lo, hi);
-       }
+       } while (lo & MSR_S_LO_CHANGE_PENDING);
 
        data->currvid = hi & MSR_S_HI_CURRENT_VID;
        data->currfid = lo & MSR_S_LO_CURRENT_FID;