Skip to content

Commit

Permalink
[CPUFREQ] Disambiguate loop indexes in powernow-k7
Browse files Browse the repository at this point in the history
This shouldn't have actually caused any problems
(as we return if we 'corrupt' 'i', but it's still not
very pretty.  For the sake of adding another local variable,
this got cleaner.

Signed-off-by: Dave Jones <davej@redhat.com>
  • Loading branch information
Dave Jones committed May 30, 2006
1 parent 2e3f8fa commit 8cbe016
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arch/i386/kernel/cpu/cpufreq/powernow-k7.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,23 +452,23 @@ static int powernow_decode_bios (int maxfid, int startvid)

pst = (struct pst_s *) p;

for (i = 0 ; i <psb->numpst; i++) {
for (j=0; j<psb->numpst; j++) {
pst = (struct pst_s *) p;
number_scales = pst->numpstates;

if ((etuple == pst->cpuid) && check_fsb(pst->fsbspeed) &&
(maxfid==pst->maxfid) && (startvid==pst->startvid))
{
dprintk ("PST:%d (@%p)\n", i, pst);
dprintk ("PST:%d (@%p)\n", j, pst);
dprintk (" cpuid: 0x%x fsb: %d maxFID: 0x%x startvid: 0x%x\n",
pst->cpuid, pst->fsbspeed, pst->maxfid, pst->startvid);

ret = get_ranges ((char *) pst + sizeof (struct pst_s));
return ret;

} else {
unsigned int k;
p = (char *) pst + sizeof (struct pst_s);
for (j=0 ; j < number_scales; j++)
for (k=0; k<number_scales; k++)
p+=2;
}
}
Expand Down

0 comments on commit 8cbe016

Please sign in to comment.