From 9628f346225dcd7b7a9e4c3df74486a4b3552cae Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 4 Feb 2009 16:49:45 +0800 Subject: [PATCH] --- yaml --- r: 130928 b: refs/heads/master c: d04dfc4c0e6056350175edc36b900a69703e9467 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/blackfin/kernel/cplb-nompu/cplbmgr.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 38526a767951..7c5b6188ff0b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bf324cb81a2f7da357eba00b6b1ef1cf38c264b8 +refs/heads/master: d04dfc4c0e6056350175edc36b900a69703e9467 diff --git a/trunk/arch/blackfin/kernel/cplb-nompu/cplbmgr.c b/trunk/arch/blackfin/kernel/cplb-nompu/cplbmgr.c index 376249ab2694..8cbb47c7b663 100644 --- a/trunk/arch/blackfin/kernel/cplb-nompu/cplbmgr.c +++ b/trunk/arch/blackfin/kernel/cplb-nompu/cplbmgr.c @@ -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;