aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-12-19 10:03:42 -0500
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-12-26 12:15:16 -0500
commit458dbb3d07574e8fcdcb921ac155ccd81b16b05f (patch)
tree38d2857bd29347a052c15fb909e10c1b39f6294a
parent43f9b25a9cdd7b177f77f026b1461abd1abbd174 (diff)
UBI: fix printk
Add proper log level to printk's. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
-rw-r--r--drivers/mtd/ubi/build.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 6ad291b33a1e..b3efb2fa3c10 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -696,8 +696,8 @@ static int __init ubi_init(void)
696 BUILD_BUG_ON(sizeof(struct ubi_vid_hdr) != 64); 696 BUILD_BUG_ON(sizeof(struct ubi_vid_hdr) != 64);
697 697
698 if (mtd_devs > UBI_MAX_DEVICES) { 698 if (mtd_devs > UBI_MAX_DEVICES) {
699 printk("UBI error: too many MTD devices, maximum is %d\n", 699 printk(KERN_ERR "UBI error: too many MTD devices, "
700 UBI_MAX_DEVICES); 700 "maximum is %d\n", UBI_MAX_DEVICES);
701 return -EINVAL; 701 return -EINVAL;
702 } 702 }
703 703
@@ -776,7 +776,8 @@ static int __init bytes_str_to_int(const char *str)
776 776
777 result = simple_strtoul(str, &endp, 0); 777 result = simple_strtoul(str, &endp, 0);
778 if (str == endp || result < 0) { 778 if (str == endp || result < 0) {
779 printk("UBI error: incorrect bytes count: \"%s\"\n", str); 779 printk(KERN_ERR "UBI error: incorrect bytes count: \"%s\"\n",
780 str);
780 return -EINVAL; 781 return -EINVAL;
781 } 782 }
782 783
@@ -794,7 +795,8 @@ static int __init bytes_str_to_int(const char *str)
794 case '\0': 795 case '\0':
795 break; 796 break;
796 default: 797 default:
797 printk("UBI error: incorrect bytes count: \"%s\"\n", str); 798 printk(KERN_ERR "UBI error: incorrect bytes count: \"%s\"\n",
799 str);
798 return -EINVAL; 800 return -EINVAL;
799 } 801 }
800 802
@@ -821,20 +823,21 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
821 return -EINVAL; 823 return -EINVAL;
822 824
823 if (mtd_devs == UBI_MAX_DEVICES) { 825 if (mtd_devs == UBI_MAX_DEVICES) {
824 printk("UBI error: too many parameters, max. is %d\n", 826 printk(KERN_ERR "UBI error: too many parameters, max. is %d\n",
825 UBI_MAX_DEVICES); 827 UBI_MAX_DEVICES);
826 return -EINVAL; 828 return -EINVAL;
827 } 829 }
828 830
829 len = strnlen(val, MTD_PARAM_LEN_MAX); 831 len = strnlen(val, MTD_PARAM_LEN_MAX);
830 if (len == MTD_PARAM_LEN_MAX) { 832 if (len == MTD_PARAM_LEN_MAX) {
831 printk("UBI error: parameter \"%s\" is too long, max. is %d\n", 833 printk(KERN_ERR "UBI error: parameter \"%s\" is too long, "
832 val, MTD_PARAM_LEN_MAX); 834 "max. is %d\n", val, MTD_PARAM_LEN_MAX);
833 return -EINVAL; 835 return -EINVAL;
834 } 836 }
835 837
836 if (len == 0) { 838 if (len == 0) {
837 printk("UBI warning: empty 'mtd=' parameter - ignored\n"); 839 printk(KERN_WARNING "UBI warning: empty 'mtd=' parameter - "
840 "ignored\n");
838 return 0; 841 return 0;
839 } 842 }
840 843
@@ -848,7 +851,8 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
848 tokens[i] = strsep(&pbuf, ","); 851 tokens[i] = strsep(&pbuf, ",");
849 852
850 if (pbuf) { 853 if (pbuf) {
851 printk("UBI error: too many arguments at \"%s\"\n", val); 854 printk(KERN_ERR "UBI error: too many arguments at \"%s\"\n",
855 val);
852 return -EINVAL; 856 return -EINVAL;
853 } 857 }
854 858