aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-08-27 08:13:05 -0400
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-09-04 02:39:02 -0400
commite28453bbb76c290d67eb28b3ff6875a6519c3998 (patch)
tree71ca0633ec0bd8723af61c2e57922dda7394ebe5 /drivers
parent049333cecbde11988c49ad4d7861eefbc3534422 (diff)
UBI: use pr_ helper instead of printk
Use 'pr_err()' instead of 'printk(KERN_ERR', etc. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/ubi/attach.c6
-rw-r--r--drivers/mtd/ubi/build.c23
-rw-r--r--drivers/mtd/ubi/debug.c149
-rw-r--r--drivers/mtd/ubi/debug.h8
-rw-r--r--drivers/mtd/ubi/gluebi.c2
-rw-r--r--drivers/mtd/ubi/ubi.h8
6 files changed, 93 insertions, 103 deletions
diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c
index d8e92b6a33f6..e1d90683e357 100644
--- a/drivers/mtd/ubi/attach.c
+++ b/drivers/mtd/ubi/attach.c
@@ -1074,10 +1074,10 @@ static int late_analysis(struct ubi_device *ubi, struct ubi_attach_info *ai)
1074 if (ai->corr_peb_count) { 1074 if (ai->corr_peb_count) {
1075 ubi_err("%d PEBs are corrupted and preserved", 1075 ubi_err("%d PEBs are corrupted and preserved",
1076 ai->corr_peb_count); 1076 ai->corr_peb_count);
1077 printk(KERN_ERR "Corrupted PEBs are:"); 1077 pr_err("Corrupted PEBs are:");
1078 list_for_each_entry(aeb, &ai->corr, u.list) 1078 list_for_each_entry(aeb, &ai->corr, u.list)
1079 printk(KERN_CONT " %d", aeb->pnum); 1079 pr_cont(" %d", aeb->pnum);
1080 printk(KERN_CONT "\n"); 1080 pr_cont("\n");
1081 1081
1082 /* 1082 /*
1083 * If too many PEBs are corrupted, we refuse attaching, 1083 * If too many PEBs are corrupted, we refuse attaching,
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)
1304 1304
1305 result = simple_strtoul(str, &endp, 0); 1305 result = simple_strtoul(str, &endp, 0);
1306 if (str == endp || result >= INT_MAX) { 1306 if (str == endp || result >= INT_MAX) {
1307 printk(KERN_ERR "UBI error: incorrect bytes count: \"%s\"\n", 1307 ubi_err("UBI error: incorrect bytes count: \"%s\"\n", str);
1308 str);
1309 return -EINVAL; 1308 return -EINVAL;
1310 } 1309 }
1311 1310
@@ -1321,8 +1320,7 @@ static int __init bytes_str_to_int(const char *str)
1321 case '\0': 1320 case '\0':
1322 break; 1321 break;
1323 default: 1322 default:
1324 printk(KERN_ERR "UBI error: incorrect bytes count: \"%s\"\n", 1323 ubi_err("UBI error: incorrect bytes count: \"%s\"\n", str);
1325 str);
1326 return -EINVAL; 1324 return -EINVAL;
1327 } 1325 }
1328 1326
@@ -1349,20 +1347,20 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
1349 return -EINVAL; 1347 return -EINVAL;
1350 1348
1351 if (mtd_devs == UBI_MAX_DEVICES) { 1349 if (mtd_devs == UBI_MAX_DEVICES) {
1352 printk(KERN_ERR "UBI error: too many parameters, max. is %d\n", 1350 ubi_err("UBI error: too many parameters, max. is %d\n",
1353 UBI_MAX_DEVICES); 1351 UBI_MAX_DEVICES);
1354 return -EINVAL; 1352 return -EINVAL;
1355 } 1353 }
1356 1354
1357 len = strnlen(val, MTD_PARAM_LEN_MAX); 1355 len = strnlen(val, MTD_PARAM_LEN_MAX);
1358 if (len == MTD_PARAM_LEN_MAX) { 1356 if (len == MTD_PARAM_LEN_MAX) {
1359 printk(KERN_ERR "UBI error: parameter \"%s\" is too long, max. is %d\n", 1357 ubi_err("UBI error: parameter \"%s\" is too long, max. is %d\n",
1360 val, MTD_PARAM_LEN_MAX); 1358 val, MTD_PARAM_LEN_MAX);
1361 return -EINVAL; 1359 return -EINVAL;
1362 } 1360 }
1363 1361
1364 if (len == 0) { 1362 if (len == 0) {
1365 printk(KERN_WARNING "UBI warning: empty 'mtd=' parameter - ignored\n"); 1363 pr_warn("UBI warning: empty 'mtd=' parameter - ignored\n");
1366 return 0; 1364 return 0;
1367 } 1365 }
1368 1366
@@ -1376,8 +1374,7 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
1376 tokens[i] = strsep(&pbuf, ","); 1374 tokens[i] = strsep(&pbuf, ",");
1377 1375
1378 if (pbuf) { 1376 if (pbuf) {
1379 printk(KERN_ERR "UBI error: too many arguments at \"%s\"\n", 1377 ubi_err("UBI error: too many arguments at \"%s\"\n", val);
1380 val);
1381 return -EINVAL; 1378 return -EINVAL;
1382 } 1379 }
1383 1380
@@ -1394,8 +1391,8 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
1394 int err = kstrtoint(tokens[2], 10, &p->max_beb_per1024); 1391 int err = kstrtoint(tokens[2], 10, &p->max_beb_per1024);
1395 1392
1396 if (err) { 1393 if (err) {
1397 printk(KERN_ERR "UBI error: bad value for max_beb_per1024 parameter: %s", 1394 ubi_err("UBI error: bad value for max_beb_per1024 parameter: %s",
1398 tokens[2]); 1395 tokens[2]);
1399 return -EINVAL; 1396 return -EINVAL;
1400 } 1397 }
1401 } 1398 }
diff --git a/drivers/mtd/ubi/debug.c b/drivers/mtd/ubi/debug.c
index dd97324f3a13..26908a59506b 100644
--- a/drivers/mtd/ubi/debug.c
+++ b/drivers/mtd/ubi/debug.c
@@ -62,21 +62,15 @@ out:
62 */ 62 */
63void ubi_dump_ec_hdr(const struct ubi_ec_hdr *ec_hdr) 63void ubi_dump_ec_hdr(const struct ubi_ec_hdr *ec_hdr)
64{ 64{
65 printk(KERN_DEBUG "Erase counter header dump:\n"); 65 pr_err("Erase counter header dump:\n");
66 printk(KERN_DEBUG "\tmagic %#08x\n", 66 pr_err("\tmagic %#08x\n", be32_to_cpu(ec_hdr->magic));
67 be32_to_cpu(ec_hdr->magic)); 67 pr_err("\tversion %d\n", (int)ec_hdr->version);
68 printk(KERN_DEBUG "\tversion %d\n", (int)ec_hdr->version); 68 pr_err("\tec %llu\n", (long long)be64_to_cpu(ec_hdr->ec));
69 printk(KERN_DEBUG "\tec %llu\n", 69 pr_err("\tvid_hdr_offset %d\n", be32_to_cpu(ec_hdr->vid_hdr_offset));
70 (long long)be64_to_cpu(ec_hdr->ec)); 70 pr_err("\tdata_offset %d\n", be32_to_cpu(ec_hdr->data_offset));
71 printk(KERN_DEBUG "\tvid_hdr_offset %d\n", 71 pr_err("\timage_seq %d\n", be32_to_cpu(ec_hdr->image_seq));
72 be32_to_cpu(ec_hdr->vid_hdr_offset)); 72 pr_err("\thdr_crc %#08x\n", be32_to_cpu(ec_hdr->hdr_crc));
73 printk(KERN_DEBUG "\tdata_offset %d\n", 73 pr_err("erase counter header hexdump:\n");
74 be32_to_cpu(ec_hdr->data_offset));
75 printk(KERN_DEBUG "\timage_seq %d\n",
76 be32_to_cpu(ec_hdr->image_seq));
77 printk(KERN_DEBUG "\thdr_crc %#08x\n",
78 be32_to_cpu(ec_hdr->hdr_crc));
79 printk(KERN_DEBUG "erase counter header hexdump:\n");
80 print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 32, 1, 74 print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 32, 1,
81 ec_hdr, UBI_EC_HDR_SIZE, 1); 75 ec_hdr, UBI_EC_HDR_SIZE, 1);
82} 76}
@@ -87,21 +81,21 @@ void ubi_dump_ec_hdr(const struct ubi_ec_hdr *ec_hdr)
87 */ 81 */
88void ubi_dump_vid_hdr(const struct ubi_vid_hdr *vid_hdr) 82void ubi_dump_vid_hdr(const struct ubi_vid_hdr *vid_hdr)
89{ 83{
90 printk(KERN_DEBUG "Volume identifier header dump:\n"); 84 pr_err("Volume identifier header dump:\n");
91 printk(KERN_DEBUG "\tmagic %08x\n", be32_to_cpu(vid_hdr->magic)); 85 pr_err("\tmagic %08x\n", be32_to_cpu(vid_hdr->magic));
92 printk(KERN_DEBUG "\tversion %d\n", (int)vid_hdr->version); 86 pr_err("\tversion %d\n", (int)vid_hdr->version);
93 printk(KERN_DEBUG "\tvol_type %d\n", (int)vid_hdr->vol_type); 87 pr_err("\tvol_type %d\n", (int)vid_hdr->vol_type);
94 printk(KERN_DEBUG "\tcopy_flag %d\n", (int)vid_hdr->copy_flag); 88 pr_err("\tcopy_flag %d\n", (int)vid_hdr->copy_flag);
95 printk(KERN_DEBUG "\tcompat %d\n", (int)vid_hdr->compat); 89 pr_err("\tcompat %d\n", (int)vid_hdr->compat);
96 printk(KERN_DEBUG "\tvol_id %d\n", be32_to_cpu(vid_hdr->vol_id)); 90 pr_err("\tvol_id %d\n", be32_to_cpu(vid_hdr->vol_id));
97 printk(KERN_DEBUG "\tlnum %d\n", be32_to_cpu(vid_hdr->lnum)); 91 pr_err("\tlnum %d\n", be32_to_cpu(vid_hdr->lnum));
98 printk(KERN_DEBUG "\tdata_size %d\n", be32_to_cpu(vid_hdr->data_size)); 92 pr_err("\tdata_size %d\n", be32_to_cpu(vid_hdr->data_size));
99 printk(KERN_DEBUG "\tused_ebs %d\n", be32_to_cpu(vid_hdr->used_ebs)); 93 pr_err("\tused_ebs %d\n", be32_to_cpu(vid_hdr->used_ebs));
100 printk(KERN_DEBUG "\tdata_pad %d\n", be32_to_cpu(vid_hdr->data_pad)); 94 pr_err("\tdata_pad %d\n", be32_to_cpu(vid_hdr->data_pad));
101 printk(KERN_DEBUG "\tsqnum %llu\n", 95 pr_err("\tsqnum %llu\n",
102 (unsigned long long)be64_to_cpu(vid_hdr->sqnum)); 96 (unsigned long long)be64_to_cpu(vid_hdr->sqnum));
103 printk(KERN_DEBUG "\thdr_crc %08x\n", be32_to_cpu(vid_hdr->hdr_crc)); 97 pr_err("\thdr_crc %08x\n", be32_to_cpu(vid_hdr->hdr_crc));
104 printk(KERN_DEBUG "Volume identifier header hexdump:\n"); 98 pr_err("Volume identifier header hexdump:\n");
105 print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 32, 1, 99 print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 32, 1,
106 vid_hdr, UBI_VID_HDR_SIZE, 1); 100 vid_hdr, UBI_VID_HDR_SIZE, 1);
107} 101}
@@ -112,25 +106,25 @@ void ubi_dump_vid_hdr(const struct ubi_vid_hdr *vid_hdr)
112 */ 106 */
113void ubi_dump_vol_info(const struct ubi_volume *vol) 107void ubi_dump_vol_info(const struct ubi_volume *vol)
114{ 108{
115 printk(KERN_DEBUG "Volume information dump:\n"); 109 pr_err("Volume information dump:\n");
116 printk(KERN_DEBUG "\tvol_id %d\n", vol->vol_id); 110 pr_err("\tvol_id %d\n", vol->vol_id);
117 printk(KERN_DEBUG "\treserved_pebs %d\n", vol->reserved_pebs); 111 pr_err("\treserved_pebs %d\n", vol->reserved_pebs);
118 printk(KERN_DEBUG "\talignment %d\n", vol->alignment); 112 pr_err("\talignment %d\n", vol->alignment);
119 printk(KERN_DEBUG "\tdata_pad %d\n", vol->data_pad); 113 pr_err("\tdata_pad %d\n", vol->data_pad);
120 printk(KERN_DEBUG "\tvol_type %d\n", vol->vol_type); 114 pr_err("\tvol_type %d\n", vol->vol_type);
121 printk(KERN_DEBUG "\tname_len %d\n", vol->name_len); 115 pr_err("\tname_len %d\n", vol->name_len);
122 printk(KERN_DEBUG "\tusable_leb_size %d\n", vol->usable_leb_size); 116 pr_err("\tusable_leb_size %d\n", vol->usable_leb_size);
123 printk(KERN_DEBUG "\tused_ebs %d\n", vol->used_ebs); 117 pr_err("\tused_ebs %d\n", vol->used_ebs);
124 printk(KERN_DEBUG "\tused_bytes %lld\n", vol->used_bytes); 118 pr_err("\tused_bytes %lld\n", vol->used_bytes);
125 printk(KERN_DEBUG "\tlast_eb_bytes %d\n", vol->last_eb_bytes); 119 pr_err("\tlast_eb_bytes %d\n", vol->last_eb_bytes);
126 printk(KERN_DEBUG "\tcorrupted %d\n", vol->corrupted); 120 pr_err("\tcorrupted %d\n", vol->corrupted);
127 printk(KERN_DEBUG "\tupd_marker %d\n", vol->upd_marker); 121 pr_err("\tupd_marker %d\n", vol->upd_marker);
128 122
129 if (vol->name_len <= UBI_VOL_NAME_MAX && 123 if (vol->name_len <= UBI_VOL_NAME_MAX &&
130 strnlen(vol->name, vol->name_len + 1) == vol->name_len) { 124 strnlen(vol->name, vol->name_len + 1) == vol->name_len) {
131 printk(KERN_DEBUG "\tname %s\n", vol->name); 125 pr_err("\tname %s\n", vol->name);
132 } else { 126 } else {
133 printk(KERN_DEBUG "\t1st 5 characters of name: %c%c%c%c%c\n", 127 pr_err("\t1st 5 characters of name: %c%c%c%c%c\n",
134 vol->name[0], vol->name[1], vol->name[2], 128 vol->name[0], vol->name[1], vol->name[2],
135 vol->name[3], vol->name[4]); 129 vol->name[3], vol->name[4]);
136 } 130 }
@@ -145,29 +139,28 @@ void ubi_dump_vtbl_record(const struct ubi_vtbl_record *r, int idx)
145{ 139{
146 int name_len = be16_to_cpu(r->name_len); 140 int name_len = be16_to_cpu(r->name_len);
147 141
148 printk(KERN_DEBUG "Volume table record %d dump:\n", idx); 142 pr_err("Volume table record %d dump:\n", idx);
149 printk(KERN_DEBUG "\treserved_pebs %d\n", 143 pr_err("\treserved_pebs %d\n", be32_to_cpu(r->reserved_pebs));
150 be32_to_cpu(r->reserved_pebs)); 144 pr_err("\talignment %d\n", be32_to_cpu(r->alignment));
151 printk(KERN_DEBUG "\talignment %d\n", be32_to_cpu(r->alignment)); 145 pr_err("\tdata_pad %d\n", be32_to_cpu(r->data_pad));
152 printk(KERN_DEBUG "\tdata_pad %d\n", be32_to_cpu(r->data_pad)); 146 pr_err("\tvol_type %d\n", (int)r->vol_type);
153 printk(KERN_DEBUG "\tvol_type %d\n", (int)r->vol_type); 147 pr_err("\tupd_marker %d\n", (int)r->upd_marker);
154 printk(KERN_DEBUG "\tupd_marker %d\n", (int)r->upd_marker); 148 pr_err("\tname_len %d\n", name_len);
155 printk(KERN_DEBUG "\tname_len %d\n", name_len);
156 149
157 if (r->name[0] == '\0') { 150 if (r->name[0] == '\0') {
158 printk(KERN_DEBUG "\tname NULL\n"); 151 pr_err("\tname NULL\n");
159 return; 152 return;
160 } 153 }
161 154
162 if (name_len <= UBI_VOL_NAME_MAX && 155 if (name_len <= UBI_VOL_NAME_MAX &&
163 strnlen(&r->name[0], name_len + 1) == name_len) { 156 strnlen(&r->name[0], name_len + 1) == name_len) {
164 printk(KERN_DEBUG "\tname %s\n", &r->name[0]); 157 pr_err("\tname %s\n", &r->name[0]);
165 } else { 158 } else {
166 printk(KERN_DEBUG "\t1st 5 characters of name: %c%c%c%c%c\n", 159 pr_err("\t1st 5 characters of name: %c%c%c%c%c\n",
167 r->name[0], r->name[1], r->name[2], r->name[3], 160 r->name[0], r->name[1], r->name[2], r->name[3],
168 r->name[4]); 161 r->name[4]);
169 } 162 }
170 printk(KERN_DEBUG "\tcrc %#08x\n", be32_to_cpu(r->crc)); 163 pr_err("\tcrc %#08x\n", be32_to_cpu(r->crc));
171} 164}
172 165
173/** 166/**
@@ -176,15 +169,15 @@ void ubi_dump_vtbl_record(const struct ubi_vtbl_record *r, int idx)
176 */ 169 */
177void ubi_dump_av(const struct ubi_ainf_volume *av) 170void ubi_dump_av(const struct ubi_ainf_volume *av)
178{ 171{
179 printk(KERN_DEBUG "Volume attaching information dump:\n"); 172 pr_err("Volume attaching information dump:\n");
180 printk(KERN_DEBUG "\tvol_id %d\n", av->vol_id); 173 pr_err("\tvol_id %d\n", av->vol_id);
181 printk(KERN_DEBUG "\thighest_lnum %d\n", av->highest_lnum); 174 pr_err("\thighest_lnum %d\n", av->highest_lnum);
182 printk(KERN_DEBUG "\tleb_count %d\n", av->leb_count); 175 pr_err("\tleb_count %d\n", av->leb_count);
183 printk(KERN_DEBUG "\tcompat %d\n", av->compat); 176 pr_err("\tcompat %d\n", av->compat);
184 printk(KERN_DEBUG "\tvol_type %d\n", av->vol_type); 177 pr_err("\tvol_type %d\n", av->vol_type);
185 printk(KERN_DEBUG "\tused_ebs %d\n", av->used_ebs); 178 pr_err("\tused_ebs %d\n", av->used_ebs);
186 printk(KERN_DEBUG "\tlast_data_size %d\n", av->last_data_size); 179 pr_err("\tlast_data_size %d\n", av->last_data_size);
187 printk(KERN_DEBUG "\tdata_pad %d\n", av->data_pad); 180 pr_err("\tdata_pad %d\n", av->data_pad);
188} 181}
189 182
190/** 183/**
@@ -194,13 +187,13 @@ void ubi_dump_av(const struct ubi_ainf_volume *av)
194 */ 187 */
195void ubi_dump_aeb(const struct ubi_ainf_peb *aeb, int type) 188void ubi_dump_aeb(const struct ubi_ainf_peb *aeb, int type)
196{ 189{
197 printk(KERN_DEBUG "eraseblock attaching information dump:\n"); 190 pr_err("eraseblock attaching information dump:\n");
198 printk(KERN_DEBUG "\tec %d\n", aeb->ec); 191 pr_err("\tec %d\n", aeb->ec);
199 printk(KERN_DEBUG "\tpnum %d\n", aeb->pnum); 192 pr_err("\tpnum %d\n", aeb->pnum);
200 if (type == 0) { 193 if (type == 0) {
201 printk(KERN_DEBUG "\tlnum %d\n", aeb->lnum); 194 pr_err("\tlnum %d\n", aeb->lnum);
202 printk(KERN_DEBUG "\tscrub %d\n", aeb->scrub); 195 pr_err("\tscrub %d\n", aeb->scrub);
203 printk(KERN_DEBUG "\tsqnum %llu\n", aeb->sqnum); 196 pr_err("\tsqnum %llu\n", aeb->sqnum);
204 } 197 }
205} 198}
206 199
@@ -212,16 +205,16 @@ void ubi_dump_mkvol_req(const struct ubi_mkvol_req *req)
212{ 205{
213 char nm[17]; 206 char nm[17];
214 207
215 printk(KERN_DEBUG "Volume creation request dump:\n"); 208 pr_err("Volume creation request dump:\n");
216 printk(KERN_DEBUG "\tvol_id %d\n", req->vol_id); 209 pr_err("\tvol_id %d\n", req->vol_id);
217 printk(KERN_DEBUG "\talignment %d\n", req->alignment); 210 pr_err("\talignment %d\n", req->alignment);
218 printk(KERN_DEBUG "\tbytes %lld\n", (long long)req->bytes); 211 pr_err("\tbytes %lld\n", (long long)req->bytes);
219 printk(KERN_DEBUG "\tvol_type %d\n", req->vol_type); 212 pr_err("\tvol_type %d\n", req->vol_type);
220 printk(KERN_DEBUG "\tname_len %d\n", req->name_len); 213 pr_err("\tname_len %d\n", req->name_len);
221 214
222 memcpy(nm, req->name, 16); 215 memcpy(nm, req->name, 16);
223 nm[16] = 0; 216 nm[16] = 0;
224 printk(KERN_DEBUG "\t1st 16 characters of name: %s\n", nm); 217 pr_err("\t1st 16 characters of name: %s\n", nm);
225} 218}
226 219
227/** 220/**
diff --git a/drivers/mtd/ubi/debug.h b/drivers/mtd/ubi/debug.h
index d9e89ec90983..ea4cb7ca3352 100644
--- a/drivers/mtd/ubi/debug.h
+++ b/drivers/mtd/ubi/debug.h
@@ -29,13 +29,13 @@ void ubi_dump_vid_hdr(const struct ubi_vid_hdr *vid_hdr);
29 29
30#define ubi_assert(expr) do { \ 30#define ubi_assert(expr) do { \
31 if (unlikely(!(expr))) { \ 31 if (unlikely(!(expr))) { \
32 printk(KERN_CRIT "UBI assert failed in %s at %u (pid %d)\n", \ 32 pr_crit("UBI assert failed in %s at %u (pid %d)\n", \
33 __func__, __LINE__, current->pid); \ 33 __func__, __LINE__, current->pid); \
34 dump_stack(); \ 34 dump_stack(); \
35 } \ 35 } \
36} while (0) 36} while (0)
37 37
38#define ubi_dbg_print_hex_dump(l, ps, pt, r, g, b, len, a) \ 38#define ubi_dbg_print_hex_dump(l, ps, pt, r, g, b, len, a) \
39 print_hex_dump(l, ps, pt, r, g, b, len, a) 39 print_hex_dump(l, ps, pt, r, g, b, len, a)
40 40
41#define ubi_dbg_msg(type, fmt, ...) \ 41#define ubi_dbg_msg(type, fmt, ...) \
@@ -43,8 +43,8 @@ void ubi_dump_vid_hdr(const struct ubi_vid_hdr *vid_hdr);
43 ##__VA_ARGS__) 43 ##__VA_ARGS__)
44 44
45/* Just a debugging messages not related to any specific UBI subsystem */ 45/* Just a debugging messages not related to any specific UBI subsystem */
46#define dbg_msg(fmt, ...) \ 46#define dbg_msg(fmt, ...) \
47 printk(KERN_DEBUG "UBI DBG (pid %d): %s: " fmt "\n", \ 47 pr_err("UBI DBG (pid %d): %s: " fmt "\n", \
48 current->pid, __func__, ##__VA_ARGS__) 48 current->pid, __func__, ##__VA_ARGS__)
49 49
50/* General debugging messages */ 50/* General debugging messages */
diff --git a/drivers/mtd/ubi/gluebi.c b/drivers/mtd/ubi/gluebi.c
index c25aa2906413..4bd4db8c84c9 100644
--- a/drivers/mtd/ubi/gluebi.c
+++ b/drivers/mtd/ubi/gluebi.c
@@ -41,7 +41,7 @@
41#include "ubi-media.h" 41#include "ubi-media.h"
42 42
43#define err_msg(fmt, ...) \ 43#define err_msg(fmt, ...) \
44 printk(KERN_DEBUG "gluebi (pid %d): %s: " fmt "\n", \ 44 pr_err("gluebi (pid %d): %s: " fmt "\n", \
45 current->pid, __func__, ##__VA_ARGS__) 45 current->pid, __func__, ##__VA_ARGS__)
46 46
47/** 47/**
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
index 2a2475b9ec54..383ee43d2425 100644
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
@@ -51,12 +51,12 @@
51#define UBI_NAME_STR "ubi" 51#define UBI_NAME_STR "ubi"
52 52
53/* Normal UBI messages */ 53/* Normal UBI messages */
54#define ubi_msg(fmt, ...) printk(KERN_NOTICE "UBI: " fmt "\n", ##__VA_ARGS__) 54#define ubi_msg(fmt, ...) pr_notice("UBI: " fmt "\n", ##__VA_ARGS__)
55/* UBI warning messages */ 55/* UBI warning messages */
56#define ubi_warn(fmt, ...) printk(KERN_WARNING "UBI warning: %s: " fmt "\n", \ 56#define ubi_warn(fmt, ...) pr_warn("UBI warning: %s: " fmt "\n", \
57 __func__, ##__VA_ARGS__) 57 __func__, ##__VA_ARGS__)
58/* UBI error messages */ 58/* UBI error messages */
59#define ubi_err(fmt, ...) printk(KERN_ERR "UBI error: %s: " fmt "\n", \ 59#define ubi_err(fmt, ...) pr_err("UBI error: %s: " fmt "\n", \
60 __func__, ##__VA_ARGS__) 60 __func__, ##__VA_ARGS__)
61 61
62/* Background thread name pattern */ 62/* Background thread name pattern */