Skip to content

Commit

Permalink
[PATCH] cpufreq-nforce2.c fix u32<0 test
Browse files Browse the repository at this point in the history
Thanks to LinuxICC (http://linuxicc.sf.net), a comparison of a u32 less
than 0 was found, this patch changes the variable to a signed int so that
comparison is meaningful.

Signed-off-by: Gabriel A. Devenyi <ace@staticwave.ca>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Jones <davej@redhat.com>
  • Loading branch information
Gabriel A. Devenyi authored and Dave Jones committed Dec 1, 2005
1 parent 537208c commit d492191
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,10 @@ static unsigned int nforce2_fsb_read(int bootfsb)
*/
static int nforce2_set_fsb(unsigned int fsb)
{
u32 pll, temp = 0;
u32 temp = 0;
unsigned int tfsb;
int diff;
int pll = 0;

if ((fsb > max_fsb) || (fsb < NFORCE2_MIN_FSB)) {
printk(KERN_ERR "cpufreq: FSB %d is out of range!\n", fsb);
Expand Down

0 comments on commit d492191

Please sign in to comment.