From: Mike Frysinger Date: Wed, 7 Jan 2009 15:14:39 +0000 (+0800) Subject: Blackfin arch: tweak the BUG_ON() check to allow for equal values X-Git-Tag: v2.6.29-rc1~189^2~82 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2eddbadaebdf77a52d5cccc7cdd116656f1cf1f9;p=linux-2.6-omap-h63xx.git Blackfin arch: tweak the BUG_ON() check to allow for equal values 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 Signed-off-by: Bryan Wu --- diff --git a/arch/blackfin/kernel/cplb-nompu/cplbinit.c b/arch/blackfin/kernel/cplb-nompu/cplbinit.c index e14c37e98ed..735413d2c22 100644 --- a/arch/blackfin/kernel/cplb-nompu/cplbinit.c +++ b/arch/blackfin/kernel/cplb-nompu/cplbinit.c @@ -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);