linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mtd-utils: more style fixups
@ 2010-10-20  6:45 Brian Norris
  2010-10-20  6:45 ` [PATCH 2/2] mtd-utils: nanddump: add 64-bit support, utilize libmtd Brian Norris
  2010-10-20  6:58 ` [PATCH 1/2] mtd-utils: more style fixups Mike Frysinger
  0 siblings, 2 replies; 18+ messages in thread
From: Brian Norris @ 2010-10-20  6:45 UTC (permalink / raw)
  To: linux-mtd; +Cc: Brian Norris, David Woodhouse, Mike Frysinger, Artem Bityutskiy

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
 nanddump.c  |    7 +++----
 nandwrite.c |    6 +++---
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/nanddump.c b/nanddump.c
index bb649da..6428bc4 100644
--- a/nanddump.c
+++ b/nanddump.c
@@ -308,7 +308,7 @@ int main(int argc, char * const argv[])
 	oob.ptr = oobbuf;
 
 	if (noecc)  {
-		ret = ioctl(fd, MTDFILEMODE, (void *) MTD_MODE_RAW);
+		ret = ioctl(fd, MTDFILEMODE, (void *)MTD_MODE_RAW);
 		if (ret == 0) {
 			oobinfochanged = 2;
 		} else {
@@ -330,7 +330,6 @@ int main(int argc, char * const argv[])
 			}
 		}
 	} else {
-
 		/* check if we can read ecc stats */
 		if (!ioctl(fd, ECCGETSTATS, &stat1)) {
 			eccstats = true;
@@ -375,7 +374,6 @@ int main(int argc, char * const argv[])
 	bs = meminfo.writesize;
 
 	/* Print informative message */
-
 	if (!quiet) {
 		fprintf(stderr, "Block size %u, page size %u, OOB size %u\n",
 				meminfo.erasesize, meminfo.writesize, meminfo.oobsize);
@@ -383,6 +381,7 @@ int main(int argc, char * const argv[])
 				"Dumping data starting at 0x%08x and ending at 0x%08x...\n",
 				(unsigned int)start_addr, (unsigned int)end_addr);
 	}
+
 	/* Dump the flash contents */
 	for (ofs = start_addr; ofs < end_addr; ofs += bs) {
 		/* Check for bad block */
@@ -401,7 +400,7 @@ int main(int argc, char * const argv[])
 		if (badblock) {
 			if (omitbad)
 				continue;
-			memset (readbuf, 0xff, bs);
+			memset(readbuf, 0xff, bs);
 		} else {
 			/* Read page data and exit on failure */
 			if (pread(fd, readbuf, bs, ofs) != bs) {
diff --git a/nandwrite.c b/nandwrite.c
index b5745b9..fe03115 100644
--- a/nandwrite.c
+++ b/nandwrite.c
@@ -592,14 +592,14 @@ int main(int argc, char * const argv[])
 				int i, start, len;
 				int tags_pos = 0;
 				/*
-				 *  We use autoplacement and have the oobinfo with the autoplacement
+				 * We use autoplacement and have the oobinfo with the autoplacement
 				 * information from the kernel available
 				 *
 				 * Modified to support out of order oobfree segments,
 				 * such as the layout used by diskonchip.c
 				 */
 				if (!oobinfochanged && (old_oobinfo.useecc == MTD_NANDECC_AUTOPLACE)) {
-					for (i = 0;old_oobinfo.oobfree[i][1]; i++) {
+					for (i = 0; old_oobinfo.oobfree[i][1]; i++) {
 						/* Set the reserved bytes to 0xff */
 						start = old_oobinfo.oobfree[i][0];
 						len = old_oobinfo.oobfree[i][1];
@@ -620,7 +620,7 @@ int main(int argc, char * const argv[])
 							len);
 				}
 			}
-			/* Write OOB data first, as ecc will be placed in there*/
+			/* Write OOB data first, as ecc will be placed in there */
 			oob.start = mtdoffset;
 			if (ioctl(fd, MEMWRITEOOB, &oob) != 0) {
 				perror("ioctl(MEMWRITEOOB)");
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2010-10-28  1:09 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-20  6:45 [PATCH 1/2] mtd-utils: more style fixups Brian Norris
2010-10-20  6:45 ` [PATCH 2/2] mtd-utils: nanddump: add 64-bit support, utilize libmtd Brian Norris
2010-10-20  7:01   ` Mike Frysinger
2010-10-20 14:03     ` Brian Norris
2010-10-20 18:26       ` Mike Frysinger
2010-10-21  7:19     ` [PATCH v2 0/2] mtd-utils fixups Brian Norris
2010-10-21  7:19       ` [PATCH v2 1/2] mtd-utils: nanddump/nandwrite: style, signed-ness, printing fixups Brian Norris
2010-10-21  7:37         ` Mike Frysinger
2010-10-21 15:54           ` Brian Norris
2010-10-21 19:45             ` Mike Frysinger
2010-10-25 19:15         ` Artem Bityutskiy
2010-10-28  1:08           ` Brian Norris
2010-10-21  7:19       ` [PATCH v2 2/2] mtd-utils: nanddump: add 64-bit support, utilize libmtd Brian Norris
2010-10-25 19:20         ` Artem Bityutskiy
2010-10-25 19:54           ` Mike Frysinger
2010-10-26  9:45             ` Artem Bityutskiy
2010-10-21  7:37       ` [PATCH v2 0/2] mtd-utils fixups Mike Frysinger
2010-10-20  6:58 ` [PATCH 1/2] mtd-utils: more style fixups Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).