mtd/drivers/mtd/nand nand_bbt.c,1.33,1.34

gleixner at infradead.org gleixner at infradead.org
Fri Jul 15 03:16:44 EDT 2005


Update of /home/cvs/mtd/drivers/mtd/nand
In directory phoenix.infradead.org:/tmp/cvs-serv29661

Modified Files:
	nand_bbt.c 
Log Message:
[MTD] NAND: Cleanup bad block scan code

check_short_pattern() had 2 unused arguments. 



Index: nand_bbt.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/nand_bbt.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- nand_bbt.c	14 Jun 2005 15:47:56 -0000	1.33
+++ nand_bbt.c	15 Jul 2005 07:16:41 -0000	1.34
@@ -109,8 +109,6 @@
 /** 
  * check_short_pattern - [GENERIC] check if a pattern is in the buffer
  * @buf:	the buffer to search
- * @len:	the length of buffer to search
- * @paglen:	the pagelength
  * @td:		search pattern descriptor
  *
  * Check for a pattern at the given place. Used to search bad block
@@ -119,7 +117,7 @@
  * at offset 0.
  *
 */
-static int check_short_pattern (uint8_t *buf, int len, int paglen, struct nand_bbt_descr *td)
+static int check_short_pattern (uint8_t *buf, struct nand_bbt_descr *td)
 {
 	int i;
 	uint8_t *p = buf;
@@ -339,11 +337,11 @@
 				
 				/* No need to read pages fully, just read required OOB bytes */
 				ret = mtd->read_oob(mtd, from + j * mtd->oobblock + bd->offs,
-							readlen, &retlen, &buf[0]);
+							readlen, &retlen, buf);
 				if (ret)
 					return ret;
 
-				if (check_short_pattern (&buf[j * scanlen], scanlen, mtd->oobblock, bd)) {
+				if (check_short_pattern (buf, bd)) {
 					this->bbt[i >> 3] |= 0x03 << (i & 0x6);
 					printk (KERN_WARNING "Bad eraseblock %d at 0x%08x\n", 
 						i >> 1, (unsigned int) from);





More information about the linux-mtd-cvs mailing list