diff options
author | roy zang <tie-fei.zang@freescale.com> | 2006-12-04 17:56:59 +0800 |
---|---|---|
committer | Zang Tiefei <roy@bus.ap.freescale.net> | 2006-12-04 17:56:59 +0800 |
commit | 9d27b3a0685ff99fc477983f315c04d49f657a8a (patch) | |
tree | 409a70e937d5f826df7929d11cb08a7cd207f5cd /lib_ppc | |
parent | 4dbcd69e3e2776ea334590d5768e3692c5fae5c1 (diff) |
Slight code clean up.
Add comments, delete duplicate define and remove spaces.
Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Diffstat (limited to 'lib_ppc')
-rw-r--r-- | lib_ppc/extable.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib_ppc/extable.c b/lib_ppc/extable.c index 623b5f129cb..fe856ffbb52 100644 --- a/lib_ppc/extable.c +++ b/lib_ppc/extable.c @@ -37,6 +37,8 @@ * on our cache or tlb entries. */ +DECLARE_GLOBAL_DATA_PTR; + struct exception_table_entry { unsigned long insn, fixup; @@ -50,22 +52,20 @@ search_one_table(const struct exception_table_entry *first, const struct exception_table_entry *last, unsigned long value) { - DECLARE_GLOBAL_DATA_PTR; - while (first <= last) { const struct exception_table_entry *mid; long diff; mid = (last - first) / 2 + first; - if (mid > CFG_MONITOR_BASE){ + if (mid > CFG_MONITOR_BASE) { /* exception occurs in FLASH, before u-boot relocation. - * No relocation offset is needed. + * No relocation offset is needed. */ diff = mid->insn - value; if (diff == 0) return mid->fixup; } else { - /* exception occurs in RAM, after u-boot relocation. + /* exception occurs in RAM, after u-boot relocation. * A relocation offset should be added. */ diff = (mid->insn + gd->reloc_off) - value; |