Commit 6fde0f30 authored by Mike Frysinger's avatar Mike Frysinger Committed by Artem Bityutskiy

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: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
parent f722406f
...@@ -1309,7 +1309,7 @@ static int __init ubi_init(void) ...@@ -1309,7 +1309,7 @@ static int __init ubi_init(void)
out_class: out_class:
class_destroy(ubi_class); class_destroy(ubi_class);
out: out:
ubi_err("UBI error: cannot initialize UBI, error %d", err); ubi_err("cannot initialize UBI, error %d", err);
return err; return err;
} }
late_initcall(ubi_init); late_initcall(ubi_init);
...@@ -1346,7 +1346,7 @@ static int __init bytes_str_to_int(const char *str) ...@@ -1346,7 +1346,7 @@ static int __init bytes_str_to_int(const char *str)
result = simple_strtoul(str, &endp, 0); result = simple_strtoul(str, &endp, 0);
if (str == endp || result >= INT_MAX) { if (str == endp || result >= INT_MAX) {
ubi_err("UBI error: incorrect bytes count: \"%s\"\n", str); ubi_err("incorrect bytes count: \"%s\"\n", str);
return -EINVAL; return -EINVAL;
} }
...@@ -1362,7 +1362,7 @@ static int __init bytes_str_to_int(const char *str) ...@@ -1362,7 +1362,7 @@ static int __init bytes_str_to_int(const char *str)
case '\0': case '\0':
break; break;
default: default:
ubi_err("UBI error: incorrect bytes count: \"%s\"\n", str); ubi_err("incorrect bytes count: \"%s\"\n", str);
return -EINVAL; return -EINVAL;
} }
...@@ -1389,14 +1389,14 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp) ...@@ -1389,14 +1389,14 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
return -EINVAL; return -EINVAL;
if (mtd_devs == UBI_MAX_DEVICES) { if (mtd_devs == UBI_MAX_DEVICES) {
ubi_err("UBI error: too many parameters, max. is %d\n", ubi_err("too many parameters, max. is %d\n",
UBI_MAX_DEVICES); UBI_MAX_DEVICES);
return -EINVAL; return -EINVAL;
} }
len = strnlen(val, MTD_PARAM_LEN_MAX); len = strnlen(val, MTD_PARAM_LEN_MAX);
if (len == MTD_PARAM_LEN_MAX) { if (len == MTD_PARAM_LEN_MAX) {
ubi_err("UBI error: parameter \"%s\" is too long, max. is %d\n", ubi_err("parameter \"%s\" is too long, max. is %d\n",
val, MTD_PARAM_LEN_MAX); val, MTD_PARAM_LEN_MAX);
return -EINVAL; return -EINVAL;
} }
...@@ -1416,7 +1416,7 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp) ...@@ -1416,7 +1416,7 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
tokens[i] = strsep(&pbuf, ","); tokens[i] = strsep(&pbuf, ",");
if (pbuf) { if (pbuf) {
ubi_err("UBI error: too many arguments at \"%s\"\n", val); ubi_err("too many arguments at \"%s\"\n", val);
return -EINVAL; return -EINVAL;
} }
...@@ -1433,7 +1433,7 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp) ...@@ -1433,7 +1433,7 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
int err = kstrtoint(tokens[2], 10, &p->max_beb_per1024); int err = kstrtoint(tokens[2], 10, &p->max_beb_per1024);
if (err) { if (err) {
ubi_err("UBI error: bad value for max_beb_per1024 parameter: %s", ubi_err("bad value for max_beb_per1024 parameter: %s",
tokens[2]); tokens[2]);
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment