* [PATCH] UBI: drop redundant "UBI error" string
@ 2013-04-23 1:29 Mike Frysinger
2013-05-03 18:54 ` [PATCH v2] " Mike Frysinger
0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2013-04-23 1:29 UTC (permalink / raw)
To: linux-mtd, Artem Bityutskiy, Adrian Hunter
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>
---
drivers/mtd/ubi/build.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index a561335..eaa2d4e 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -1309,7 +1309,7 @@ out_version:
out_class:
class_destroy(ubi_class);
out:
- ubi_err("UBI error: cannot initialize UBI, error %d", err);
+ ubi_err("cannot initialize UBI, error %d", err);
return err;
}
late_initcall(ubi_init);
--
1.8.2.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2] UBI: drop redundant "UBI error" string
2013-04-23 1:29 [PATCH] UBI: drop redundant "UBI error" string Mike Frysinger
@ 2013-05-03 18:54 ` Mike Frysinger
2013-05-16 9:39 ` Artem Bityutskiy
0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2013-05-03 18:54 UTC (permalink / raw)
To: linux-mtd, Artem Bityutskiy, Adrian Hunter
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>
---
v2
- found some more places in latest mainline
drivers/mtd/ubi/build.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index a561335..745fbc5 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -1309,7 +1309,7 @@ out_version:
out_class:
class_destroy(ubi_class);
out:
- ubi_err("UBI error: cannot initialize UBI, error %d", err);
+ ubi_err("cannot initialize UBI, error %d", err);
return err;
}
late_initcall(ubi_init);
@@ -1346,7 +1346,7 @@ static int __init bytes_str_to_int(const char *str)
result = simple_strtoul(str, &endp, 0);
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;
}
@@ -1362,7 +1362,7 @@ static int __init bytes_str_to_int(const char *str)
case '\0':
break;
default:
- ubi_err("UBI error: incorrect bytes count: \"%s\"\n", str);
+ ubi_err("incorrect bytes count: \"%s\"\n", str);
return -EINVAL;
}
@@ -1389,14 +1389,14 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
return -EINVAL;
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);
return -EINVAL;
}
len = strnlen(val, 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);
return -EINVAL;
}
@@ -1416,7 +1416,7 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
tokens[i] = strsep(&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;
}
@@ -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);
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]);
return -EINVAL;
}
--
1.8.2.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] UBI: drop redundant "UBI error" string
2013-05-03 18:54 ` [PATCH v2] " Mike Frysinger
@ 2013-05-16 9:39 ` Artem Bityutskiy
0 siblings, 0 replies; 3+ messages in thread
From: Artem Bityutskiy @ 2013-05-16 9:39 UTC (permalink / raw)
To: Mike Frysinger; +Cc: linux-mtd, Adrian Hunter
On Fri, 2013-05-03 at 14:54 -0400, Mike Frysinger wrote:
> 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>
Pushed to linux-ubi.git, thanks!
--
Best Regards,
Artem Bityutskiy
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-05-16 9:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-23 1:29 [PATCH] UBI: drop redundant "UBI error" string Mike Frysinger
2013-05-03 18:54 ` [PATCH v2] " Mike Frysinger
2013-05-16 9:39 ` Artem Bityutskiy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.