public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Gerst <bgerst@didntduck.org>
To: davej@codemonkey.org.uk
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH] Fix warning in powernow-k8.c
Date: Thu, 02 Jun 2005 12:58:06 -0400	[thread overview]
Message-ID: <429F3A9E.504@didntduck.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 214 bytes --]

Fix this warning:
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>

[-- Attachment #2: powernow-k8 --]
[-- Type: text/plain, Size: 651 bytes --]

diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
@@ -110,14 +110,13 @@ static int query_current_values_with_pen
 	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;

             reply	other threads:[~2005-06-02 16:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-02 16:58 Brian Gerst [this message]
2005-06-03 16:11 ` [PATCH] Fix warning in powernow-k8.c Pavel Machek
2005-06-03 18:31   ` Brian Gerst
2005-06-03 18:56     ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=429F3A9E.504@didntduck.org \
    --to=bgerst@didntduck.org \
    --cc=davej@codemonkey.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox