[MTD] [DOC200x] eccbuf is statically defined and always evaluate to true
authorSamuel Tardieu <sam@rfc1149.net>
Tue, 5 Feb 2008 07:44:47 +0000 (23:44 -0800)
committerDavid Woodhouse <dwmw2@infradead.org>
Thu, 7 Feb 2008 10:34:36 +0000 (10:34 +0000)
Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Acked-by: Joern Engel <joern@logfs.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
drivers/mtd/devices/doc2000.c
drivers/mtd/devices/doc2001plus.c

index c73e96bfafc636047bbe9bebef7067b4a79d4bb3..e9ce241b7fe5be65b2e505715ff0bd138ba1a4a4 100644 (file)
@@ -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;
index 2b30b587c6e840c0e820a9a30aff74ba40f90f3c..83be3461658f22527a40ab1e57ec0efa503c8252 100644 (file)
@@ -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 */