From 410bbc9498714eec746f500c30d24ee335626021 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 19 Mar 2012 01:16:25 +0000 Subject: [PATCH] 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 --- sim/bfin/ChangeLog | 5 +++++ sim/bfin/dv-bfin_ebiu_amc.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index 812c782c00..5e1c014989 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,3 +1,8 @@ +2012-03-18 Mike Frysinger + + * dv-bfin_ebiu_amc.c (bfin_ebiu_amc_attach_address_callback): Use + ARRAY_SIZE rather than hardcoded constant. + 2012-02-04 Mike Frysinger * config.in: Regenerate. diff --git a/sim/bfin/dv-bfin_ebiu_amc.c b/sim/bfin/dv-bfin_ebiu_amc.c index 2e372f7d8b..c96caf7130 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--) -- 2.34.1