]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/mtd/nand/nand_base.c
karo: merge with Ka-Ro specific tree for secure boot support
[karo-tx-uboot.git] / drivers / mtd / nand / nand_base.c
index 63bdf65f82c46949bce9fc975a469d3cda86311a..fa8dace7e9dd5b8f6c2fd93586d1a40219ea05b4 100644 (file)
@@ -2513,7 +2513,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
@@ -4260,6 +4260,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;