aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2013-05-03 14:54:34 -0400
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2013-05-16 05:37:15 -0400
commit6fde0f307cdc3cdf7a11a13c5335e11627f9ef24 (patch)
treed1a0caa1582995048267afbfa0fba342ba2055f4 /drivers/mtd
parentf722406faae2d073cc1d01063d1123c35425939e (diff)
UBI: drop redundant "UBI error" string
The ubi_err() macro automatically prefixes "UBI error" before the message. By also using it here, we get a log like so: UBI error: ubi_init: UBI error: cannot initialize UBI, error -19 Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/ubi/build.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index a56133585e92..745fbc574141 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -1309,7 +1309,7 @@ out_version:
1309out_class: 1309out_class:
1310 class_destroy(ubi_class); 1310 class_destroy(ubi_class);
1311out: 1311out:
1312 ubi_err("UBI error: cannot initialize UBI, error %d", err); 1312 ubi_err("cannot initialize UBI, error %d", err);
1313 return err; 1313 return err;
1314} 1314}
1315late_initcall(ubi_init); 1315late_initcall(ubi_init);
@@ -1346,7 +1346,7 @@ static int __init bytes_str_to_int(const char *str)
1346 1346
1347 result = simple_strtoul(str, &endp, 0); 1347 result = simple_strtoul(str, &endp, 0);
1348 if (str == endp || result >= INT_MAX) { 1348 if (str == endp || result >= INT_MAX) {
1349 ubi_err("UBI error: incorrect bytes count: \"%s\"\n", str); 1349 ubi_err("incorrect bytes count: \"%s\"\n", str);
1350 return -EINVAL; 1350 return -EINVAL;
1351 } 1351 }
1352 1352
@@ -1362,7 +1362,7 @@ static int __init bytes_str_to_int(const char *str)
1362 case '\0': 1362 case '\0':
1363 break; 1363 break;
1364 default: 1364 default:
1365 ubi_err("UBI error: incorrect bytes count: \"%s\"\n", str); 1365 ubi_err("incorrect bytes count: \"%s\"\n", str);
1366 return -EINVAL; 1366 return -EINVAL;
1367 } 1367 }
1368 1368
@@ -1389,14 +1389,14 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
1389 return -EINVAL; 1389 return -EINVAL;
1390 1390
1391 if (mtd_devs == UBI_MAX_DEVICES) { 1391 if (mtd_devs == UBI_MAX_DEVICES) {
1392 ubi_err("UBI error: too many parameters, max. is %d\n", 1392 ubi_err("too many parameters, max. is %d\n",
1393 UBI_MAX_DEVICES); 1393 UBI_MAX_DEVICES);
1394 return -EINVAL; 1394 return -EINVAL;
1395 } 1395 }
1396 1396
1397 len = strnlen(val, MTD_PARAM_LEN_MAX); 1397 len = strnlen(val, MTD_PARAM_LEN_MAX);
1398 if (len == MTD_PARAM_LEN_MAX) { 1398 if (len == MTD_PARAM_LEN_MAX) {
1399 ubi_err("UBI error: parameter \"%s\" is too long, max. is %d\n", 1399 ubi_err("parameter \"%s\" is too long, max. is %d\n",
1400 val, MTD_PARAM_LEN_MAX); 1400 val, MTD_PARAM_LEN_MAX);
1401 return -EINVAL; 1401 return -EINVAL;
1402 } 1402 }
@@ -1416,7 +1416,7 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
1416 tokens[i] = strsep(&pbuf, ","); 1416 tokens[i] = strsep(&pbuf, ",");
1417 1417
1418 if (pbuf) { 1418 if (pbuf) {
1419 ubi_err("UBI error: too many arguments at \"%s\"\n", val); 1419 ubi_err("too many arguments at \"%s\"\n", val);
1420 return -EINVAL; 1420 return -EINVAL;
1421 } 1421 }
1422 1422
@@ -1433,7 +1433,7 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
1433 int err = kstrtoint(tokens[2], 10, &p->max_beb_per1024); 1433 int err = kstrtoint(tokens[2], 10, &p->max_beb_per1024);
1434 1434
1435 if (err) { 1435 if (err) {
1436 ubi_err("UBI error: bad value for max_beb_per1024 parameter: %s", 1436 ubi_err("bad value for max_beb_per1024 parameter: %s",
1437 tokens[2]); 1437 tokens[2]);
1438 return -EINVAL; 1438 return -EINVAL;
1439 } 1439 }