aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-03-19 01:16:25 +0000
committerMike Frysinger <vapier@gentoo.org>2012-03-19 01:16:25 +0000
commit410bbc9498714eec746f500c30d24ee335626021 (patch)
tree6611c41e99aabe2e764310982df959b0b69ca369 /sim
parentd4ba18a2acb7ef8570718ef9e7818ede2e547929 (diff)
downloadgdb-410bbc9498714eec746f500c30d24ee335626021.zip
gdb-410bbc9498714eec746f500c30d24ee335626021.tar.gz
gdb-410bbc9498714eec746f500c30d24ee335626021.tar.bz2
sim: bfin: use ARRAY_SIZE
Rather than hardcode the constant, use ARRAY_SIZE to get it. Should be no functional changes here. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'sim')
-rw-r--r--sim/bfin/ChangeLog5
-rw-r--r--sim/bfin/dv-bfin_ebiu_amc.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog
index 812c782..5e1c014 100644
--- a/sim/bfin/ChangeLog
+++ b/sim/bfin/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-18 Mike Frysinger <vapier@gentoo.org>
+
+ * dv-bfin_ebiu_amc.c (bfin_ebiu_amc_attach_address_callback): Use
+ ARRAY_SIZE rather than hardcoded constant.
+
2012-02-04 Mike Frysinger <vapier@gentoo.org>
* config.in: Regenerate.
diff --git a/sim/bfin/dv-bfin_ebiu_amc.c b/sim/bfin/dv-bfin_ebiu_amc.c
index 2e372f7..c96caf7 100644
--- a/sim/bfin/dv-bfin_ebiu_amc.c
+++ b/sim/bfin/dv-bfin_ebiu_amc.c
@@ -335,7 +335,7 @@ bfin_ebiu_amc_attach_address_callback (struct hw *me,
HW_TRACE ((me, "attach - level=%d, space=%d, addr=0x%lx, nr_bytes=%lu, client=%s",
level, space, (unsigned long) addr, (unsigned long) nr_bytes, hw_path (client)));
- if (addr + nr_bytes > 4)
+ if (addr + nr_bytes > ARRAY_SIZE (amc->slaves))
hw_abort (me, "ebiu amc attaches are done in terms of banks");
while (nr_bytes--)