mtd: atmel_nand: Simplify error messages
authorRomain Izard <romain.izard.pro@gmail.com>
Fri, 15 Jan 2016 10:34:56 +0000 (11:34 +0100)
committerBrian Norris <computersforpeace@gmail.com>
Sat, 23 Jan 2016 23:03:47 +0000 (15:03 -0800)
The error messages when the ECC controller is misconfigured through the
device tree are very precise. As a result they can (and will) get
obsolete when new revisions of the controller appear.

Simplify them before adding the support for the new revision.

Signed-off-by: Romain Izard <romain.izard.pro@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/atmel_nand.c

index 0ae6cba5bef5d819338b7587bcf51fbaa028146b..ad9f4b0620492f0b9ec92c6ffffcac4c92161b26 100644 (file)
@@ -1550,7 +1550,7 @@ static int atmel_of_init_port(struct atmel_nand_host *host,
                if ((val != 2) && (val != 4) && (val != 8) && (val != 12) &&
                                (val != 24)) {
                        dev_err(host->dev,
-                               "Unsupported PMECC correction capability: %d; should be 2, 4, 8, 12 or 24\n",
+                               "Required ECC strength not supported: %u\n",
                                val);
                        return -EINVAL;
                }
@@ -1560,7 +1560,7 @@ static int atmel_of_init_port(struct atmel_nand_host *host,
        if (of_property_read_u32(np, "atmel,pmecc-sector-size", &val) == 0) {
                if ((val != 512) && (val != 1024)) {
                        dev_err(host->dev,
-                               "Unsupported PMECC sector size: %d; should be 512 or 1024 bytes\n",
+                               "Required ECC sector size not supported: %u\n",
                                val);
                        return -EINVAL;
                }