From e28453bbb76c290d67eb28b3ff6875a6519c3998 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Mon, 27 Aug 2012 15:13:05 +0300 Subject: UBI: use pr_ helper instead of printk Use 'pr_err()' instead of 'printk(KERN_ERR', etc. Signed-off-by: Artem Bityutskiy --- drivers/mtd/ubi/build.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'drivers/mtd/ubi/build.c') diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index dd9bc0a5cc31..998a0bfc30dd 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c @@ -1304,8 +1304,7 @@ static int __init bytes_str_to_int(const char *str) result = simple_strtoul(str, &endp, 0); if (str == endp || result >= INT_MAX) { - printk(KERN_ERR "UBI error: incorrect bytes count: \"%s\"\n", - str); + ubi_err("UBI error: incorrect bytes count: \"%s\"\n", str); return -EINVAL; } @@ -1321,8 +1320,7 @@ static int __init bytes_str_to_int(const char *str) case '\0': break; default: - printk(KERN_ERR "UBI error: incorrect bytes count: \"%s\"\n", - str); + ubi_err("UBI error: incorrect bytes count: \"%s\"\n", str); return -EINVAL; } @@ -1349,20 +1347,20 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp) return -EINVAL; if (mtd_devs == UBI_MAX_DEVICES) { - printk(KERN_ERR "UBI error: too many parameters, max. is %d\n", - UBI_MAX_DEVICES); + ubi_err("UBI error: 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) { - printk(KERN_ERR "UBI error: parameter \"%s\" is too long, max. is %d\n", - val, MTD_PARAM_LEN_MAX); + ubi_err("UBI error: parameter \"%s\" is too long, max. is %d\n", + val, MTD_PARAM_LEN_MAX); return -EINVAL; } if (len == 0) { - printk(KERN_WARNING "UBI warning: empty 'mtd=' parameter - ignored\n"); + pr_warn("UBI warning: empty 'mtd=' parameter - ignored\n"); return 0; } @@ -1376,8 +1374,7 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp) tokens[i] = strsep(&pbuf, ","); if (pbuf) { - printk(KERN_ERR "UBI error: too many arguments at \"%s\"\n", - val); + ubi_err("UBI error: too many arguments at \"%s\"\n", val); return -EINVAL; } @@ -1394,8 +1391,8 @@ 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) { - printk(KERN_ERR "UBI error: bad value for max_beb_per1024 parameter: %s", - tokens[2]); + ubi_err("UBI error: bad value for max_beb_per1024 parameter: %s", + tokens[2]); return -EINVAL; } } -- cgit v1.2.3-55-g7522