[MTD] [DOC200x] eccbuf is statically defined and always evaluate to true
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Thu Feb 7 05:59:02 EST 2008
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=53fb84a0695ffeeeadf8ae92db28cbccf5325531
Commit: 53fb84a0695ffeeeadf8ae92db28cbccf5325531
Parent: d5476689afd48e71395602698409e9f48cbba413
Author: Samuel Tardieu <sam at rfc1149.net>
AuthorDate: Mon Feb 4 23:44:47 2008 -0800
Committer: David Woodhouse <dwmw2 at infradead.org>
CommitDate: Thu Feb 7 10:34:36 2008 +0000
[MTD] [DOC200x] eccbuf is statically defined and always evaluate to true
Signed-off-by: Samuel Tardieu <sam at rfc1149.net>
Acked-by: Joern Engel <joern at logfs.org>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
---
drivers/mtd/devices/doc2000.c | 4 ++--
drivers/mtd/devices/doc2001plus.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/devices/doc2000.c b/drivers/mtd/devices/doc2000.c
index c73e96b..e9ce241 100644
--- a/drivers/mtd/devices/doc2000.c
+++ b/drivers/mtd/devices/doc2000.c
@@ -632,7 +632,7 @@ static int doc_read(struct mtd_info *mtd, loff_t from, size_t len,
len = ((from | 0x1ff) + 1) - from;
/* The ECC will not be calculated correctly if less than 512 is read */
- if (len != 0x200 && eccbuf)
+ if (len != 0x200)
printk(KERN_WARNING
"ECC needs a full sector read (adr: %lx size %lx)\n",
(long) from, (long) len);
@@ -896,7 +896,7 @@ static int doc_write(struct mtd_info *mtd, loff_t to, size_t len,
/* Let the caller know we completed it */
*retlen += len;
- if (eccbuf) {
+ {
unsigned char x[8];
size_t dummy;
int ret;
diff --git a/drivers/mtd/devices/doc2001plus.c b/drivers/mtd/devices/doc2001plus.c
index 2b30b58..83be346 100644
--- a/drivers/mtd/devices/doc2001plus.c
+++ b/drivers/mtd/devices/doc2001plus.c
@@ -748,7 +748,7 @@ static int doc_write(struct mtd_info *mtd, loff_t to, size_t len,
WriteDOC(DoC_GetDataOffset(mtd, &fto), docptr, Mplus_FlashCmd);
/* On interleaved devices the flags for 2nd half 512 are before data */
- if (eccbuf && before)
+ if (before)
fto -= 2;
/* issue the Serial Data In command to initial the Page Program process */
More information about the linux-mtd-cvs
mailing list