Skip to content

Commit

Permalink
Blackfin arch: tweak the BUG_ON() check to allow for equal values
Browse files Browse the repository at this point in the history
Tweak the BUG_ON() check to allow for equal values since the way pos is
handled ... it is always indexed and post incremented

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
  • Loading branch information
Mike Frysinger authored and Bryan Wu committed Jan 7, 2009
1 parent 983e101 commit 2eddbad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arch/blackfin/kernel/cplb-nompu/cplbinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,10 +425,10 @@ void __init generate_cplb_tables_cpu(unsigned int cpu)
BUG_ON(cplb.init_d.pos < 1 + cplb_data[ZERO_P].valid + cplb_data[L1D_MEM].valid);

/* make sure we didnt overflow the table */
BUG_ON(cplb.init_i.size <= cplb.init_i.pos);
BUG_ON(cplb.init_d.size <= cplb.init_d.pos);
BUG_ON(cplb.switch_i.size <= cplb.switch_i.pos);
BUG_ON(cplb.switch_d.size <= cplb.switch_d.pos);
BUG_ON(cplb.init_i.size < cplb.init_i.pos);
BUG_ON(cplb.init_d.size < cplb.init_d.pos);
BUG_ON(cplb.switch_i.size < cplb.switch_i.pos);
BUG_ON(cplb.switch_d.size < cplb.switch_d.pos);

/* close tables */
close_cplbtab(&cplb.init_i);
Expand Down

0 comments on commit 2eddbad

Please sign in to comment.