The patch titled mtd: eccbuf is statically defined and always evaluate to true has been added to the -mm tree. Its filename is eccbuf-is-statically-defined-and-always-evaluate-to-true.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: mtd: eccbuf is statically defined and always evaluate to true From: Samuel Tardieu <sam@xxxxxxxxxxx> Signed-off-by: Samuel Tardieu <sam@xxxxxxxxxxx> Acked-by: Joern Engel <joern@xxxxxxxxx> Cc: David Woodhouse <dwmw2@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/mtd/devices/doc2000.c | 4 ++-- drivers/mtd/devices/doc2001plus.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff -puN drivers/mtd/devices/doc2000.c~eccbuf-is-statically-defined-and-always-evaluate-to-true drivers/mtd/devices/doc2000.c --- a/drivers/mtd/devices/doc2000.c~eccbuf-is-statically-defined-and-always-evaluate-to-true +++ a/drivers/mtd/devices/doc2000.c @@ -632,7 +632,7 @@ static int doc_read(struct mtd_info *mtd 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 *mt /* Let the caller know we completed it */ *retlen += len; - if (eccbuf) { + { unsigned char x[8]; size_t dummy; int ret; diff -puN drivers/mtd/devices/doc2001plus.c~eccbuf-is-statically-defined-and-always-evaluate-to-true drivers/mtd/devices/doc2001plus.c --- a/drivers/mtd/devices/doc2001plus.c~eccbuf-is-statically-defined-and-always-evaluate-to-true +++ a/drivers/mtd/devices/doc2001plus.c @@ -748,7 +748,7 @@ static int doc_write(struct mtd_info *mt 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 */ _ Patches currently in -mm which might be from sam@xxxxxxxxxxx are eccbuf-is-statically-defined-and-always-evaluate-to-true.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html