Patchwork nandwrite: Remove redundant 'autoplace' check

login
register
mail settings
Submitter Shinya Kuribayashi
Date Sept. 24, 2010, 9:22 a.m.
Message ID <4C9C6DED.5040200@renesas.com>
Download mbox | patch
Permalink /patch/65632/
State New
Headers show

Comments

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(-)
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

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");