diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c index ffb2303395587c90ed08657fa06a31989659f112..332f992f13d982e4d1d46164f673a4f67914ce87 100644 --- a/drivers/mtd/ubi/io.c +++ b/drivers/mtd/ubi/io.c @@ -150,7 +150,7 @@ int ubi_io_read(const struct ubi_device *ubi, void *buf, int pnum, int offset, retry: err = ubi->mtd->read(ubi->mtd, addr, len, &read, buf); if (err) { - const char errstr = (err == -EBADMSG) ? "ECC error" : ""; + const char *errstr = (err == -EBADMSG) ? " (ECC error)" : ""; if (err == -EUCLEAN) { /* @@ -174,7 +174,7 @@ int ubi_io_read(const struct ubi_device *ubi, void *buf, int pnum, int offset, goto retry; } - ubi_err("error %d while reading %d bytes from PEB %d:%d, " + ubi_err("error %d%s while reading %d bytes from PEB %d:%d, " "read %zd bytes", err, errstr, len, pnum, offset, read); ubi_dbg_dump_stack(); diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c index de7b2f1c41136c7b9bfdbd1580e6602ecb884711..37855e55651faafb376093fb8ff16ae3d75d5a45 100644 --- a/drivers/mtd/ubi/scan.c +++ b/drivers/mtd/ubi/scan.c @@ -901,8 +901,7 @@ static int process_eb(struct ubi_device *ubi, struct ubi_scan_info *si, * MTD device. Returns zero if we should proceed with attaching the MTD device, * and %-EINVAL if we should not. */ -static int check_what_we_have(const struct ubi_device *ubi, - struct ubi_scan_info *si) +static int check_what_we_have(struct ubi_device *ubi, struct ubi_scan_info *si) { struct ubi_scan_leb *seb; int max_corr;