diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-06-06 17:37:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-06 19:08:13 -0400 |
commit | 0158de12b00e7f0e7821c706e91477b6079eb9e9 (patch) | |
tree | 1879248913bb5f03f6ee6b4ba1658634ae1a109c /fs/affs | |
parent | 0c89d67016081ac40109c5ed8ca7a698805203c2 (diff) |
fs/affs: convert printk to pr_foo()
-All printk(KERN_foo converted to pr_foo()
-Default printk converted to pr_warn()
-Add pr_fmt to affs.h
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/affs')
-rw-r--r-- | fs/affs/affs.h | 6 | ||||
-rw-r--r-- | fs/affs/amigaffs.c | 6 | ||||
-rw-r--r-- | fs/affs/bitmap.c | 13 | ||||
-rw-r--r-- | fs/affs/super.c | 24 |
4 files changed, 26 insertions, 23 deletions
diff --git a/fs/affs/affs.h b/fs/affs/affs.h index 25b23b1e7f22..347ee6fc5875 100644 --- a/fs/affs/affs.h +++ b/fs/affs/affs.h | |||
@@ -1,3 +1,9 @@ | |||
1 | #ifdef pr_fmt | ||
2 | #undef pr_fmt | ||
3 | #endif | ||
4 | |||
5 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
6 | |||
1 | #include <linux/types.h> | 7 | #include <linux/types.h> |
2 | #include <linux/fs.h> | 8 | #include <linux/fs.h> |
3 | #include <linux/buffer_head.h> | 9 | #include <linux/buffer_head.h> |
diff --git a/fs/affs/amigaffs.c b/fs/affs/amigaffs.c index 533a322c41c0..fa8ba6a6de4e 100644 --- a/fs/affs/amigaffs.c +++ b/fs/affs/amigaffs.c | |||
@@ -451,10 +451,10 @@ affs_error(struct super_block *sb, const char *function, const char *fmt, ...) | |||
451 | vsnprintf(ErrorBuffer,sizeof(ErrorBuffer),fmt,args); | 451 | vsnprintf(ErrorBuffer,sizeof(ErrorBuffer),fmt,args); |
452 | va_end(args); | 452 | va_end(args); |
453 | 453 | ||
454 | printk(KERN_CRIT "AFFS error (device %s): %s(): %s\n", sb->s_id, | 454 | pr_crit("error (device %s): %s(): %s\n", sb->s_id, |
455 | function,ErrorBuffer); | 455 | function,ErrorBuffer); |
456 | if (!(sb->s_flags & MS_RDONLY)) | 456 | if (!(sb->s_flags & MS_RDONLY)) |
457 | printk(KERN_WARNING "AFFS: Remounting filesystem read-only\n"); | 457 | pr_warn("Remounting filesystem read-only\n"); |
458 | sb->s_flags |= MS_RDONLY; | 458 | sb->s_flags |= MS_RDONLY; |
459 | } | 459 | } |
460 | 460 | ||
@@ -467,7 +467,7 @@ affs_warning(struct super_block *sb, const char *function, const char *fmt, ...) | |||
467 | vsnprintf(ErrorBuffer,sizeof(ErrorBuffer),fmt,args); | 467 | vsnprintf(ErrorBuffer,sizeof(ErrorBuffer),fmt,args); |
468 | va_end(args); | 468 | va_end(args); |
469 | 469 | ||
470 | printk(KERN_WARNING "AFFS warning (device %s): %s(): %s\n", sb->s_id, | 470 | pr_warn("(device %s): %s(): %s\n", sb->s_id, |
471 | function,ErrorBuffer); | 471 | function,ErrorBuffer); |
472 | } | 472 | } |
473 | 473 | ||
diff --git a/fs/affs/bitmap.c b/fs/affs/bitmap.c index a32246b8359e..d9559f5d2d1b 100644 --- a/fs/affs/bitmap.c +++ b/fs/affs/bitmap.c | |||
@@ -254,8 +254,7 @@ int affs_init_bitmap(struct super_block *sb, int *flags) | |||
254 | return 0; | 254 | return 0; |
255 | 255 | ||
256 | if (!AFFS_ROOT_TAIL(sb, sbi->s_root_bh)->bm_flag) { | 256 | if (!AFFS_ROOT_TAIL(sb, sbi->s_root_bh)->bm_flag) { |
257 | printk(KERN_NOTICE "AFFS: Bitmap invalid - mounting %s read only\n", | 257 | pr_notice("Bitmap invalid - mounting %s read only\n", sb->s_id); |
258 | sb->s_id); | ||
259 | *flags |= MS_RDONLY; | 258 | *flags |= MS_RDONLY; |
260 | return 0; | 259 | return 0; |
261 | } | 260 | } |
@@ -268,7 +267,7 @@ int affs_init_bitmap(struct super_block *sb, int *flags) | |||
268 | size = sbi->s_bmap_count * sizeof(*bm); | 267 | size = sbi->s_bmap_count * sizeof(*bm); |
269 | bm = sbi->s_bitmap = kzalloc(size, GFP_KERNEL); | 268 | bm = sbi->s_bitmap = kzalloc(size, GFP_KERNEL); |
270 | if (!sbi->s_bitmap) { | 269 | if (!sbi->s_bitmap) { |
271 | printk(KERN_ERR "AFFS: Bitmap allocation failed\n"); | 270 | pr_err("Bitmap allocation failed\n"); |
272 | return -ENOMEM; | 271 | return -ENOMEM; |
273 | } | 272 | } |
274 | 273 | ||
@@ -282,13 +281,13 @@ int affs_init_bitmap(struct super_block *sb, int *flags) | |||
282 | bm->bm_key = be32_to_cpu(bmap_blk[blk]); | 281 | bm->bm_key = be32_to_cpu(bmap_blk[blk]); |
283 | bh = affs_bread(sb, bm->bm_key); | 282 | bh = affs_bread(sb, bm->bm_key); |
284 | if (!bh) { | 283 | if (!bh) { |
285 | printk(KERN_ERR "AFFS: Cannot read bitmap\n"); | 284 | pr_err("Cannot read bitmap\n"); |
286 | res = -EIO; | 285 | res = -EIO; |
287 | goto out; | 286 | goto out; |
288 | } | 287 | } |
289 | if (affs_checksum_block(sb, bh)) { | 288 | if (affs_checksum_block(sb, bh)) { |
290 | printk(KERN_WARNING "AFFS: Bitmap %u invalid - mounting %s read only.\n", | 289 | pr_warn("Bitmap %u invalid - mounting %s read only.\n", |
291 | bm->bm_key, sb->s_id); | 290 | bm->bm_key, sb->s_id); |
292 | *flags |= MS_RDONLY; | 291 | *flags |= MS_RDONLY; |
293 | goto out; | 292 | goto out; |
294 | } | 293 | } |
@@ -304,7 +303,7 @@ int affs_init_bitmap(struct super_block *sb, int *flags) | |||
304 | affs_brelse(bmap_bh); | 303 | affs_brelse(bmap_bh); |
305 | bmap_bh = affs_bread(sb, be32_to_cpu(bmap_blk[blk])); | 304 | bmap_bh = affs_bread(sb, be32_to_cpu(bmap_blk[blk])); |
306 | if (!bmap_bh) { | 305 | if (!bmap_bh) { |
307 | printk(KERN_ERR "AFFS: Cannot read bitmap extension\n"); | 306 | pr_err("Cannot read bitmap extension\n"); |
308 | res = -EIO; | 307 | res = -EIO; |
309 | goto out; | 308 | goto out; |
310 | } | 309 | } |
diff --git a/fs/affs/super.c b/fs/affs/super.c index 895ac7dc9dbf..507791263ec8 100644 --- a/fs/affs/super.c +++ b/fs/affs/super.c | |||
@@ -220,7 +220,7 @@ parse_options(char *options, kuid_t *uid, kgid_t *gid, int *mode, int *reserved, | |||
220 | return 0; | 220 | return 0; |
221 | if (n != 512 && n != 1024 && n != 2048 | 221 | if (n != 512 && n != 1024 && n != 2048 |
222 | && n != 4096) { | 222 | && n != 4096) { |
223 | printk ("AFFS: Invalid blocksize (512, 1024, 2048, 4096 allowed)\n"); | 223 | pr_warn("Invalid blocksize (512, 1024, 2048, 4096 allowed)\n"); |
224 | return 0; | 224 | return 0; |
225 | } | 225 | } |
226 | *blocksize = n; | 226 | *blocksize = n; |
@@ -285,8 +285,8 @@ parse_options(char *options, kuid_t *uid, kgid_t *gid, int *mode, int *reserved, | |||
285 | /* Silently ignore the quota options */ | 285 | /* Silently ignore the quota options */ |
286 | break; | 286 | break; |
287 | default: | 287 | default: |
288 | printk("AFFS: Unrecognized mount option \"%s\" " | 288 | pr_warn("Unrecognized mount option \"%s\" or missing value\n", |
289 | "or missing value\n", p); | 289 | p); |
290 | return 0; | 290 | return 0; |
291 | } | 291 | } |
292 | } | 292 | } |
@@ -339,7 +339,7 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent) | |||
339 | if (!parse_options(data,&uid,&gid,&i,&reserved,&root_block, | 339 | if (!parse_options(data,&uid,&gid,&i,&reserved,&root_block, |
340 | &blocksize,&sbi->s_prefix, | 340 | &blocksize,&sbi->s_prefix, |
341 | sbi->s_volume, &mount_flags)) { | 341 | sbi->s_volume, &mount_flags)) { |
342 | printk(KERN_ERR "AFFS: Error parsing options\n"); | 342 | pr_err("Error parsing options\n"); |
343 | return -EINVAL; | 343 | return -EINVAL; |
344 | } | 344 | } |
345 | /* N.B. after this point s_prefix must be released */ | 345 | /* N.B. after this point s_prefix must be released */ |
@@ -407,8 +407,7 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent) | |||
407 | } | 407 | } |
408 | } | 408 | } |
409 | if (!silent) | 409 | if (!silent) |
410 | printk(KERN_ERR "AFFS: No valid root block on device %s\n", | 410 | pr_err("No valid root block on device %s\n", sb->s_id); |
411 | sb->s_id); | ||
412 | return -EINVAL; | 411 | return -EINVAL; |
413 | 412 | ||
414 | /* N.B. after this point bh must be released */ | 413 | /* N.B. after this point bh must be released */ |
@@ -420,7 +419,7 @@ got_root: | |||
420 | /* Find out which kind of FS we have */ | 419 | /* Find out which kind of FS we have */ |
421 | boot_bh = sb_bread(sb, 0); | 420 | boot_bh = sb_bread(sb, 0); |
422 | if (!boot_bh) { | 421 | if (!boot_bh) { |
423 | printk(KERN_ERR "AFFS: Cannot read boot block\n"); | 422 | pr_err("Cannot read boot block\n"); |
424 | return -EINVAL; | 423 | return -EINVAL; |
425 | } | 424 | } |
426 | memcpy(sig, boot_bh->b_data, 4); | 425 | memcpy(sig, boot_bh->b_data, 4); |
@@ -433,8 +432,7 @@ got_root: | |||
433 | */ | 432 | */ |
434 | if ((chksum == FS_DCFFS || chksum == MUFS_DCFFS || chksum == FS_DCOFS | 433 | if ((chksum == FS_DCFFS || chksum == MUFS_DCFFS || chksum == FS_DCOFS |
435 | || chksum == MUFS_DCOFS) && !(sb->s_flags & MS_RDONLY)) { | 434 | || chksum == MUFS_DCOFS) && !(sb->s_flags & MS_RDONLY)) { |
436 | printk(KERN_NOTICE "AFFS: Dircache FS - mounting %s read only\n", | 435 | pr_notice("Dircache FS - mounting %s read only\n", sb->s_id); |
437 | sb->s_id); | ||
438 | sb->s_flags |= MS_RDONLY; | 436 | sb->s_flags |= MS_RDONLY; |
439 | } | 437 | } |
440 | switch (chksum) { | 438 | switch (chksum) { |
@@ -468,14 +466,14 @@ got_root: | |||
468 | sb->s_flags |= MS_NOEXEC; | 466 | sb->s_flags |= MS_NOEXEC; |
469 | break; | 467 | break; |
470 | default: | 468 | default: |
471 | printk(KERN_ERR "AFFS: Unknown filesystem on device %s: %08X\n", | 469 | pr_err("Unknown filesystem on device %s: %08X\n", |
472 | sb->s_id, chksum); | 470 | sb->s_id, chksum); |
473 | return -EINVAL; | 471 | return -EINVAL; |
474 | } | 472 | } |
475 | 473 | ||
476 | if (mount_flags & SF_VERBOSE) { | 474 | if (mount_flags & SF_VERBOSE) { |
477 | u8 len = AFFS_ROOT_TAIL(sb, root_bh)->disk_name[0]; | 475 | u8 len = AFFS_ROOT_TAIL(sb, root_bh)->disk_name[0]; |
478 | printk(KERN_NOTICE "AFFS: Mounting volume \"%.*s\": Type=%.3s\\%c, Blocksize=%d\n", | 476 | pr_notice("Mounting volume \"%.*s\": Type=%.3s\\%c, Blocksize=%d\n", |
479 | len > 31 ? 31 : len, | 477 | len > 31 ? 31 : len, |
480 | AFFS_ROOT_TAIL(sb, root_bh)->disk_name + 1, | 478 | AFFS_ROOT_TAIL(sb, root_bh)->disk_name + 1, |
481 | sig, sig[3] + '0', blocksize); | 479 | sig, sig[3] + '0', blocksize); |
@@ -506,7 +504,7 @@ got_root: | |||
506 | 504 | ||
507 | sb->s_root = d_make_root(root_inode); | 505 | sb->s_root = d_make_root(root_inode); |
508 | if (!sb->s_root) { | 506 | if (!sb->s_root) { |
509 | printk(KERN_ERR "AFFS: Get root inode failed\n"); | 507 | pr_err("AFFS: Get root inode failed\n"); |
510 | return -ENOMEM; | 508 | return -ENOMEM; |
511 | } | 509 | } |
512 | 510 | ||