Title: [5895] trunk/arch/blackfin/kernel/cplb-nompu/cplbinit.c: we do not need a NULL trailing entry as any time we access the bounds arrays, we use the nr_bounds variable
Revision
5895
Author
vapier
Date
2008-12-18 17:09:03 -0600 (Thu, 18 Dec 2008)

Log Message

we do not need a NULL trailing entry as any time we access the bounds arrays, we use the nr_bounds variable

Modified Paths

Diff

Modified: trunk/arch/blackfin/kernel/cplb-nompu/cplbinit.c (5894 => 5895)


--- trunk/arch/blackfin/kernel/cplb-nompu/cplbinit.c	2008-12-18 19:20:35 UTC (rev 5894)
+++ trunk/arch/blackfin/kernel/cplb-nompu/cplbinit.c	2008-12-18 23:09:03 UTC (rev 5895)
@@ -35,8 +35,8 @@
 int first_switched_icplb PDT_ATTR;
 int first_switched_dcplb PDT_ATTR;
 
-struct cplb_boundary dcplb_bounds[10] PDT_ATTR;
-struct cplb_boundary icplb_bounds[10] PDT_ATTR;
+struct cplb_boundary dcplb_bounds[9] PDT_ATTR;
+struct cplb_boundary icplb_bounds[7] PDT_ATTR;
 
 int icplb_nr_bounds PDT_ATTR;
 int dcplb_nr_bounds PDT_ATTR;
@@ -130,9 +130,8 @@
 		dcplb_bounds[i_d].eaddr = L2_START + L2_LENGTH;
 		dcplb_bounds[i_d++].data = ""
 	}
-	dcplb_bounds[i_d].eaddr = 0;
 	dcplb_nr_bounds = i_d;
-	BUG_ON(dcplb_nr_bounds >= ARRAY_SIZE(dcplb_bounds));
+	BUG_ON(dcplb_nr_bounds > ARRAY_SIZE(dcplb_bounds));
 
 	i_i = 0;
 	/* Normal RAM, including MTD FS.  */
@@ -167,7 +166,6 @@
 		icplb_bounds[i_i].eaddr = L2_START + L2_LENGTH;
 		icplb_bounds[i_i++].data = ""
 	}
-	icplb_bounds[i_i].eaddr = 0;
 	icplb_nr_bounds = i_i;
-	BUG_ON(icplb_nr_bounds >= ARRAY_SIZE(icplb_bounds));
+	BUG_ON(icplb_nr_bounds > ARRAY_SIZE(icplb_bounds));
 }
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
http://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to