Commit 53fb84a0 authored by Samuel Tardieu's avatar Samuel Tardieu Committed by David Woodhouse

[MTD] [DOC200x] eccbuf is statically defined and always evaluate to true

Signed-off-by: default avatarSamuel Tardieu <sam@rfc1149.net>
Acked-by: default avatarJoern Engel <joern@logfs.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent d5476689
...@@ -632,7 +632,7 @@ static int doc_read(struct mtd_info *mtd, loff_t from, size_t len, ...@@ -632,7 +632,7 @@ static int doc_read(struct mtd_info *mtd, loff_t from, size_t len,
len = ((from | 0x1ff) + 1) - from; len = ((from | 0x1ff) + 1) - from;
/* The ECC will not be calculated correctly if less than 512 is read */ /* The ECC will not be calculated correctly if less than 512 is read */
if (len != 0x200 && eccbuf) if (len != 0x200)
printk(KERN_WARNING printk(KERN_WARNING
"ECC needs a full sector read (adr: %lx size %lx)\n", "ECC needs a full sector read (adr: %lx size %lx)\n",
(long) from, (long) len); (long) from, (long) len);
...@@ -896,7 +896,7 @@ static int doc_write(struct mtd_info *mtd, loff_t to, size_t 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 */ /* Let the caller know we completed it */
*retlen += len; *retlen += len;
if (eccbuf) { {
unsigned char x[8]; unsigned char x[8];
size_t dummy; size_t dummy;
int ret; int ret;
......
...@@ -748,7 +748,7 @@ static int doc_write(struct mtd_info *mtd, loff_t to, size_t len, ...@@ -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); WriteDOC(DoC_GetDataOffset(mtd, &fto), docptr, Mplus_FlashCmd);
/* On interleaved devices the flags for 2nd half 512 are before data */ /* On interleaved devices the flags for 2nd half 512 are before data */
if (eccbuf && before) if (before)
fto -= 2; fto -= 2;
/* issue the Serial Data In command to initial the Page Program process */ /* issue the Serial Data In command to initial the Page Program process */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment