mtd/drivers/mtd nftlcore.c,1.90,1.91

David Woodhouse dwmw2 at infradead.org
Fri May 23 07:31:49 EDT 2003


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

Modified Files:
	nftlcore.c 
Log Message:
cleanups inspired by inftl

Index: nftlcore.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nftlcore.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -r1.90 -r1.91
--- nftlcore.c	21 May 2003 13:18:21 -0000	1.90
+++ nftlcore.c	23 May 2003 11:31:46 -0000	1.91
@@ -46,12 +46,12 @@
 	if (mtd->ecctype != MTD_ECC_RS_DiskOnChip)
 		return;
 
-	DEBUG(MTD_DEBUG_LEVEL1, "nftl_add_mtd for %s\n", mtd->name);
+	DEBUG(MTD_DEBUG_LEVEL1, "NFTL: add_mtd for %s\n", mtd->name);
 
 	nftl = kmalloc(sizeof(struct NFTLrecord), GFP_KERNEL);
 
 	if (!nftl) {
-		printk(KERN_WARNING "Out of memory for NFTL data structures\n");
+		printk(KERN_WARNING "NFTL: out of memory for data structures\n");
 		return;
 	}
 	memset(nftl, 0, sizeof(*nftl));
@@ -62,7 +62,7 @@
 	nftl->mbd.tr = tr;
 
         if (NFTL_mount(nftl) < 0) {
-		printk(KERN_WARNING "Could not mount NFTL device\n");
+		printk(KERN_WARNING "NFTL: could not mount device\n");
 		kfree(nftl);
 		return;
         }
@@ -92,11 +92,13 @@
 		  Oh no we don't have 
 		   mbd.size == heads * cylinders * sectors
 		*/
-		printk(KERN_WARNING "Cannot calculate an NFTL geometry to "
-		       "precisely match size of 0x%lx.\n", nftl->mbd.size);
-		printk(KERN_WARNING "Using C:%d H:%d S:%d (== 0x%lx sects)\n", 
-		       nftl->cylinders, nftl->heads , nftl->sectors, 
-		       (long)nftl->cylinders * (long)nftl->heads * (long)nftl->sectors );
+		printk(KERN_WARNING "NFTL: cannot calculate a geometry to "
+		       "match size of 0x%lx.\n", nftl->mbd.size);
+		printk(KERN_WARNING "NFTL: using C:%d H:%d S:%d "
+			"(== 0x%lx sects)\n",
+			nftl->cylinders, nftl->heads , nftl->sectors, 
+			(long)nftl->cylinders * (long)nftl->heads *
+			(long)nftl->sectors );
 	}
 
 	if (add_mtd_blktrans_dev) {
@@ -108,16 +110,15 @@
 		return;
 	}
 #ifdef PSYCHO_DEBUG
-	printk("Found new NFTL nftl%c\n", nftl->mbd.devnum + 'a');
+	printk(KERN_INFO "NFTL: Found new nftl%c\n", nftl->mbd.devnum + 'a');
 #endif
-	return;
 }
 
 static void nftl_remove_dev(struct mtd_blktrans_dev *dev)
 {
 	struct NFTLrecord *nftl = (void *)dev;
 
-	DEBUG(MTD_DEBUG_LEVEL1, "nftl_remove_dev %d\n", dev->devnum);
+	DEBUG(MTD_DEBUG_LEVEL1, "NFTL: remove_dev (i=%d)\n", dev->devnum);
 
 	del_mtd_blktrans_dev(dev);
 	if (nftl->ReplUnitTable)




More information about the linux-mtd-cvs mailing list