]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/mtd/nand/nand_base.c
update to 2015.04-rc1
[karo-tx-uboot.git] / drivers / mtd / nand / nand_base.c
index 6db6566e733656d55a88c024bd1b07b5c6d58c3c..5aaea904c204bed97273f495a5ed331a77e9ebdf 100644 (file)
@@ -2508,7 +2508,7 @@ static uint8_t *nand_fill_oob(struct mtd_info *mtd, uint8_t *oob, size_t len,
        return NULL;
 }
 
-#define NOTALIGNED(x)  ((x & (chip->subpagesize - 1)) != 0)
+#define NOTALIGNED(x)  (((x) & (chip->subpagesize - 1)) != 0)
 
 /**
  * nand_do_write_ops - [INTERN] NAND write with ECC
@@ -4255,6 +4255,8 @@ int nand_scan_tail(struct mtd_info *mtd)
        ecc->steps = mtd->writesize / ecc->size;
        if (ecc->steps * ecc->size != mtd->writesize) {
                pr_warn("Invalid ECC parameters\n");
+               pr_warn("steps=%d size=%d writesize=%d\n",
+                       chip->ecc.steps, chip->ecc.size, mtd->writesize);
                BUG();
        }
        ecc->total = ecc->steps * ecc->bytes;