提交 8cbe0169 编写于 作者: D Dave Jones

[CPUFREQ] Disambiguate loop indexes in powernow-k7

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: NDave Jones <davej@redhat.com>
上级 2e3f8faa
...@@ -452,23 +452,23 @@ static int powernow_decode_bios (int maxfid, int startvid) ...@@ -452,23 +452,23 @@ static int powernow_decode_bios (int maxfid, int startvid)
pst = (struct pst_s *) p; pst = (struct pst_s *) p;
for (i = 0 ; i <psb->numpst; i++) { for (j=0; j<psb->numpst; j++) {
pst = (struct pst_s *) p; pst = (struct pst_s *) p;
number_scales = pst->numpstates; number_scales = pst->numpstates;
if ((etuple == pst->cpuid) && check_fsb(pst->fsbspeed) && if ((etuple == pst->cpuid) && check_fsb(pst->fsbspeed) &&
(maxfid==pst->maxfid) && (startvid==pst->startvid)) (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", dprintk (" cpuid: 0x%x fsb: %d maxFID: 0x%x startvid: 0x%x\n",
pst->cpuid, pst->fsbspeed, pst->maxfid, pst->startvid); pst->cpuid, pst->fsbspeed, pst->maxfid, pst->startvid);
ret = get_ranges ((char *) pst + sizeof (struct pst_s)); ret = get_ranges ((char *) pst + sizeof (struct pst_s));
return ret; return ret;
} else { } else {
unsigned int k;
p = (char *) pst + sizeof (struct pst_s); p = (char *) pst + sizeof (struct pst_s);
for (j=0 ; j < number_scales; j++) for (k=0; k<number_scales; k++)
p+=2; p+=2;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册