mtd/drivers/mtd/nand nand.c,1.51,1.52

David Woodhouse dwmw2 at infradead.org
Tue Jul 8 08:53:38 EDT 2003


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

Modified Files:
	nand.c 
Log Message:
Rate limit the ECC whinge.


Index: nand.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/nand.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- nand.c	3 Jul 2003 10:38:12 -0000	1.51
+++ nand.c	8 Jul 2003 12:53:35 -0000	1.52
@@ -662,10 +662,15 @@
 			
 		j = 0;
 		switch (eccmode) {
-		case NAND_ECC_NONE:	/* No ECC, Read in a page */		
-			printk (KERN_WARNING "Reading data from NAND FLASH without ECC is not recommended\n");
+		case NAND_ECC_NONE: {	/* No ECC, Read in a page */
+			static unsigned long lastwhinge = 0;
+			if (lastwhinge != jiffies) {
+				printk (KERN_WARNING "Reading data from NAND FLASH without ECC is not recommended\n");
+				lastwhinge = jiffies;
+			}
 			this->read_buf(mtd, data_poi, end);
 			break;
+		}
 			
 		case NAND_ECC_SOFT:	/* Software ECC 3/256: Read in a page + oob data */
 			this->read_buf(mtd, data_poi, end);




More information about the linux-mtd-cvs mailing list