Commit 458dbb3d authored by Artem Bityutskiy's avatar Artem Bityutskiy

UBI: fix printk

Add proper log level to printk's.
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
parent 43f9b25a
...@@ -696,8 +696,8 @@ static int __init ubi_init(void) ...@@ -696,8 +696,8 @@ static int __init ubi_init(void)
BUILD_BUG_ON(sizeof(struct ubi_vid_hdr) != 64); BUILD_BUG_ON(sizeof(struct ubi_vid_hdr) != 64);
if (mtd_devs > UBI_MAX_DEVICES) { if (mtd_devs > UBI_MAX_DEVICES) {
printk("UBI error: too many MTD devices, maximum is %d\n", printk(KERN_ERR "UBI error: too many MTD devices, "
UBI_MAX_DEVICES); "maximum is %d\n", UBI_MAX_DEVICES);
return -EINVAL; return -EINVAL;
} }
...@@ -776,7 +776,8 @@ static int __init bytes_str_to_int(const char *str) ...@@ -776,7 +776,8 @@ 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 < 0) { if (str == endp || result < 0) {
printk("UBI error: incorrect bytes count: \"%s\"\n", str); printk(KERN_ERR "UBI error: incorrect bytes count: \"%s\"\n",
str);
return -EINVAL; return -EINVAL;
} }
...@@ -794,7 +795,8 @@ static int __init bytes_str_to_int(const char *str) ...@@ -794,7 +795,8 @@ static int __init bytes_str_to_int(const char *str)
case '\0': case '\0':
break; break;
default: default:
printk("UBI error: incorrect bytes count: \"%s\"\n", str); printk(KERN_ERR "UBI error: incorrect bytes count: \"%s\"\n",
str);
return -EINVAL; return -EINVAL;
} }
...@@ -821,20 +823,21 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp) ...@@ -821,20 +823,21 @@ 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) {
printk("UBI error: too many parameters, max. is %d\n", printk(KERN_ERR "UBI error: 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) {
printk("UBI error: parameter \"%s\" is too long, max. is %d\n", printk(KERN_ERR "UBI error: parameter \"%s\" is too long, "
val, MTD_PARAM_LEN_MAX); "max. is %d\n", val, MTD_PARAM_LEN_MAX);
return -EINVAL; return -EINVAL;
} }
if (len == 0) { if (len == 0) {
printk("UBI warning: empty 'mtd=' parameter - ignored\n"); printk(KERN_WARNING "UBI warning: empty 'mtd=' parameter - "
"ignored\n");
return 0; return 0;
} }
...@@ -848,7 +851,8 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp) ...@@ -848,7 +851,8 @@ 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) {
printk("UBI error: too many arguments at \"%s\"\n", val); printk(KERN_ERR "UBI error: too many arguments at \"%s\"\n",
val);
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