nandwrite: Remove redundant 'autoplace' check

Submitted by Shinya Kuribayashi on Sept. 24, 2010, 9:22 a.m.

Details

Message ID 4C9C6DED.5040200@renesas.com
State Accepted
Commit 6edaa0c971aab663cda573ded5013b3b998ee5d4
Headers show

Commit Message

Shinya Kuribayashi Sept. 24, 2010, 9:22 a.m.
We're already in 'if (autoplace) { }' block at ths moment.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
---

 Along with Mike's nandwrite patches, I'd like to toss out a trivial
 one, too ;-)

 nandwrite.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Artem Bityutskiy Sept. 25, 2010, 10:57 a.m.
On Fri, 2010-09-24 at 18:22 +0900, Shinya Kuribayashi wrote:
> We're already in 'if (autoplace) { }' block at ths moment.
> 
> Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
> ---

Pushed, thanks!

Patch hide | download patch | download mbox

diff --git a/nandwrite.c b/nandwrite.c
index 8fe8875..9eb2004 100644
--- a/nandwrite.c
+++ b/nandwrite.c
@@ -331,7 +331,7 @@  int main(int argc, char * const argv[])
 		}
 
 		// autoplace ECC ?
-		if (autoplace && (old_oobinfo.useecc != MTD_NANDECC_AUTOPLACE)) {
+		if (old_oobinfo.useecc != MTD_NANDECC_AUTOPLACE) {
 
 			if (ioctl (fd, MEMSETOOBSEL, &autoplace_oobinfo) != 0) {
 				perror ("MEMSETOOBSEL");