mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
Blackfin arch: cplb mananger: use a do...while loop rather than a for loop
use a do...while loop rather than a for loop to get slightly better optimization and to avoid gcc "may be used uninitialized" warnings ... we know that the [id]cplb_nr_bounds variables will never be 0, so this is OK Signed-off-by: Mike Frysinger <[email protected]> Signed-off-by: Bryan Wu <[email protected]>
This commit is contained in:
parent
bf324cb81a
commit
d04dfc4c0e
1 changed files with 8 additions and 4 deletions
|
|
@ -163,12 +163,14 @@ MGR_ATTR static int icplb_miss(int cpu)
|
|||
nr_icplb_supv_miss[cpu]++;
|
||||
|
||||
base = 0;
|
||||
for (idx = 0; idx < icplb_nr_bounds; idx++) {
|
||||
idx = 0;
|
||||
do {
|
||||
eaddr = icplb_bounds[idx].eaddr;
|
||||
if (addr < eaddr)
|
||||
break;
|
||||
base = eaddr;
|
||||
}
|
||||
} while (++idx < icplb_nr_bounds);
|
||||
|
||||
if (unlikely(idx == icplb_nr_bounds))
|
||||
return CPLB_NO_ADDR_MATCH;
|
||||
|
||||
|
|
@ -208,12 +210,14 @@ MGR_ATTR static int dcplb_miss(int cpu)
|
|||
nr_dcplb_supv_miss[cpu]++;
|
||||
|
||||
base = 0;
|
||||
for (idx = 0; idx < dcplb_nr_bounds; idx++) {
|
||||
idx = 0;
|
||||
do {
|
||||
eaddr = dcplb_bounds[idx].eaddr;
|
||||
if (addr < eaddr)
|
||||
break;
|
||||
base = eaddr;
|
||||
}
|
||||
} while (++idx < dcplb_nr_bounds);
|
||||
|
||||
if (unlikely(idx == dcplb_nr_bounds))
|
||||
return CPLB_NO_ADDR_MATCH;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue