Skip to content

Commit 6fde0f3

Browse files
vapierdedekind
authored andcommitted
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 <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]>
1 parent f722406 commit 6fde0f3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/mtd/ubi/build.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,7 +1309,7 @@ static int __init ubi_init(void)
13091309
out_class:
13101310
class_destroy(ubi_class);
13111311
out:
1312-
ubi_err("UBI error: cannot initialize UBI, error %d", err);
1312+
ubi_err("cannot initialize UBI, error %d", err);
13131313
return err;
13141314
}
13151315
late_initcall(ubi_init);
@@ -1346,7 +1346,7 @@ static int __init bytes_str_to_int(const char *str)
13461346

13471347
result = simple_strtoul(str, &endp, 0);
13481348
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);
13501350
return -EINVAL;
13511351
}
13521352

@@ -1362,7 +1362,7 @@ static int __init bytes_str_to_int(const char *str)
13621362
case '\0':
13631363
break;
13641364
default:
1365-
ubi_err("UBI error: incorrect bytes count: \"%s\"\n", str);
1365+
ubi_err("incorrect bytes count: \"%s\"\n", str);
13661366
return -EINVAL;
13671367
}
13681368

@@ -1389,14 +1389,14 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
13891389
return -EINVAL;
13901390

13911391
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",
13931393
UBI_MAX_DEVICES);
13941394
return -EINVAL;
13951395
}
13961396

13971397
len = strnlen(val, MTD_PARAM_LEN_MAX);
13981398
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",
14001400
val, MTD_PARAM_LEN_MAX);
14011401
return -EINVAL;
14021402
}
@@ -1416,7 +1416,7 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
14161416
tokens[i] = strsep(&pbuf, ",");
14171417

14181418
if (pbuf) {
1419-
ubi_err("UBI error: too many arguments at \"%s\"\n", val);
1419+
ubi_err("too many arguments at \"%s\"\n", val);
14201420
return -EINVAL;
14211421
}
14221422

@@ -1433,7 +1433,7 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
14331433
int err = kstrtoint(tokens[2], 10, &p->max_beb_per1024);
14341434

14351435
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",
14371437
tokens[2]);
14381438
return -EINVAL;
14391439
}

0 commit comments

Comments
 (0)