mtd/drivers/mtd/devices blkmtd-24.c,1.22,1.23

dmarlin at infradead.org dmarlin at infradead.org
Mon Aug 9 14:49:44 EDT 2004


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

Modified Files:
	blkmtd-24.c 
Log Message:
Try to resync 2.4 version with trunk (blkmtd.c) changes.


Index: blkmtd-24.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/blkmtd-24.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- blkmtd-24.c	9 Aug 2004 13:19:44 -0000	1.22
+++ blkmtd-24.c	9 Aug 2004 18:49:42 -0000	1.23
@@ -254,7 +254,7 @@
 	pagenr = to >> PAGE_SHIFT;
 	offset = to & ~PAGE_MASK;
 
-	DEBUG(2, "blkmtd: write_pages: buf = %p to = %ld len = %d pagenr = %d offset = %d\n",
+	DEBUG(2, "blkmtd: write_pages: buf = %p to = %ld len = %zd pagenr = %d offset = %d\n",
 	      buf, (long)to, len, pagenr, offset);
 
 	*retlen = 0;
@@ -281,7 +281,7 @@
 		pagecnt++;
 	}
 
-	DEBUG(3, "blkmtd: write: start_len = %d len = %d end_len = %d pagecnt = %d\n",
+	DEBUG(3, "blkmtd: write: start_len = %zd len = %zd end_len = %zd pagecnt = %d\n",
 	      start_len, len, end_len, pagecnt);
 
 	down(&dev->wrbuf_mutex);
@@ -311,12 +311,12 @@
 		/* do partial start region */
 		struct page *page;
 
-		DEBUG(3, "blkmtd: write: doing partial start, page = %d len = %d offset = %d\n",
+		DEBUG(3, "blkmtd: write: doing partial start, page = %d len = %zd offset = %d\n",
 		      pagenr, start_len, offset);
 		page = pagelst[0];
 		BUG_ON(!buf);
 		if(PageDirty(page) && pagenr != ignorepage) {
-			err("to = %lld start_len = %d len = %d end_len = %d pagenr = %d ignorepage = %d\n",
+			err("to = %lld start_len = %zd len = %zd end_len = %zd pagenr = %d ignorepage = %d\n",
 			    to, start_len, len, end_len, pagenr, ignorepage);
 			BUG();
 		}
@@ -371,12 +371,12 @@
 	if(end_len) {
 		/* do the third region */
 		struct page *page;
-		DEBUG(3, "blkmtd: write: doing partial end, page = %d len = %d\n",
+		DEBUG(3, "blkmtd: write: doing partial end, page = %d len = %zd\n",
 		      pagenr, end_len);
 		page = pagelst[readpages-1];
 		BUG_ON(!buf);
 		if(PageDirty(page) && pagenr != ignorepage) {
-			err("to = %lld start_len = %d len = %d end_len = %d pagenr = %d ignorepage = %d\n",
+			err("to = %lld start_len = %zd len = %zd end_len = %zd pagenr = %d ignorepage = %d\n",
 			    to, start_len, len, end_len, pagenr, ignorepage);
 			BUG();
 		}
@@ -392,7 +392,7 @@
 		iobuf->nr_pages++;
 	}
 
-	DEBUG(2, "blkmtd: write: end, retlen = %d, err = %d\n", *retlen, err);
+	DEBUG(2, "blkmtd: write: end, retlen = %zd, err = %d\n", *retlen, err);
 
 	if(sync) {
 write_err:
@@ -414,7 +414,7 @@
 	size_t from;
 	u_long len;
 	int err = -EIO;
-	int retlen;
+	size_t retlen;
 
 	/* check readonly */
 	if(!dev->wr_buf) {
@@ -429,7 +429,7 @@
 	len = instr->len;
 
 	/* check erase region has valid start and length */
-	DEBUG(2, "blkmtd: erase: dev = `%s' from = 0x%x len = 0x%lx\n",
+	DEBUG(2, "blkmtd: erase: dev = `%s' from = 0x%zx len = 0x%lx\n",
 	      bdevname(dev->binding->bd_dev), from, len);
 	while(numregions) {
 		DEBUG(3, "blkmtd: checking erase region = 0x%08X size = 0x%X num = 0x%x\n",
@@ -446,14 +446,14 @@
 
 	if(!numregions) {
 		/* Not a valid erase block */
-		err("erase: invalid erase request 0x%lX @ 0x%08X", len, from);
+		err("erase: invalid erase request 0x%lX @ 0x%08zX", len, from);
 		instr->state = MTD_ERASE_FAILED;
 		err = -EIO;
 	}
 
 	if(instr->state != MTD_ERASE_FAILED) {
 		/* do the erase */
-		DEBUG(3, "Doing erase from = %d len = %ld\n", from, len);
+		DEBUG(3, "Doing erase from = %zd len = %ld\n", from, len);
 		err = write_pages(dev, NULL, from, len, &retlen);
 		if(err < 0) {
 			err("erase failed err = %d", err);
@@ -486,8 +486,8 @@
 
 	*retlen = 0;
 
-	DEBUG(2, "blkmtd: read: dev = `%s' from = %ld len = %d buf = %p\n",
-	      bdevname(dev->binding->bd_dev), (long int)from, len, buf);
+	DEBUG(2, "blkmtd: read: dev = `%s' from = %lld len = %zd buf = %p\n",
+	      bdevname(dev->binding->bd_dev), from, len, buf);
 
 	pagenr = from >> PAGE_SHIFT;
 	offset = from - (pagenr << PAGE_SHIFT);
@@ -537,7 +537,7 @@
  readerr:
 	kfree(pagelst);
 	kfree(pagenrs);
-	DEBUG(2, "blkmtd: end read: retlen = %d, err = %d\n", *retlen, err);
+	DEBUG(2, "blkmtd: end read: retlen = %zd, err = %d\n", *retlen, err);
 	return err;
 }
 
@@ -553,8 +553,8 @@
 	if(!len)
 		return 0;
 
-	DEBUG(2, "blkmtd: write: dev = `%s' to = %ld len = %d buf = %p\n",
-	      bdevname(dev->binding->bd_dev), (long int)to, len, buf);
+	DEBUG(2, "blkmtd: write: dev = `%s' to = %lld len = %zd buf = %p\n",
+	      bdevname(dev->binding->bd_dev), to, len, buf);
 
 	/* handle readonly and out of range numbers */
 
@@ -718,7 +718,7 @@
 {
 	struct mtd_erase_region_info *info = NULL;
 
-	DEBUG(2, "calc_erase_regions, es = %d size = %d regions = %d\n",
+	DEBUG(2, "calc_erase_regions, es = %zd size = %zd regions = %d\n",
 	      erase_size, total_size, *regions);
 	/* Make any user specified erasesize be a power of 2
 	   and at least PAGE_SIZE */
@@ -766,7 +766,7 @@
 				break;
 		}
 	} while(!(*regions));
-	DEBUG(2, "calc_erase_regions done, es = %d size = %d regions = %d\n",
+	DEBUG(2, "calc_erase_regions done, es = %zd size = %zd regions = %d\n",
 	      erase_size, total_size, *regions);
 	return info;
 }





More information about the linux-mtd-cvs mailing list