From: "Brian Norris" <computersforpeace@gmail.com>
To: linux-mtd@lists.infradead.org
Cc: Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
Mike Frysinger <vapier.adi@gmail.com>,
Artem Bityutskiy <dedekind1@gmail.com>
Subject: [PATCH 1/2] mtd-utils: more style fixups
Date: Tue, 19 Oct 2010 23:45:24 -0700 [thread overview]
Message-ID: <1287557125-2672-1-git-send-email-computersforpeace@gmail.com> (raw)
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
next reply other threads:[~2010-10-20 6:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-20 6:45 Brian Norris [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1287557125-2672-1-git-send-email-computersforpeace@gmail.com \
--to=computersforpeace@gmail.com \
--cc=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=vapier.adi@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.