Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fs/qnx6: use pr_fmt and __func__ in logging

Remove "qnx6:" and "qnx6: " from each logging instruction.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: Joe Perches <joe@perches.com>
Cc: Kai Bankett <chaosman@ontika.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Fabian Frederick and committed by
Linus Torvalds
e6c32616 e00d5b5a

+44 -38
+6 -6
fs/qnx6/dir.c
··· 77 77 if (de->de_size != 0xff) { 78 78 /* error - long filename entries always have size 0xff 79 79 in direntry */ 80 - pr_err("qnx6: invalid direntry size (%i).\n", de->de_size); 80 + pr_err("invalid direntry size (%i).\n", de->de_size); 81 81 return 0; 82 82 } 83 83 lf = qnx6_longname(s, de, &page); 84 84 if (IS_ERR(lf)) { 85 - pr_err("qnx6:Error reading longname\n"); 85 + pr_err("Error reading longname\n"); 86 86 return 0; 87 87 } 88 88 ··· 90 90 91 91 if (lf_size > QNX6_LONG_NAME_MAX) { 92 92 QNX6DEBUG((KERN_INFO "file %s\n", lf->lf_fname)); 93 - pr_err("qnx6:Filename too long (%i)\n", lf_size); 93 + pr_err("Filename too long (%i)\n", lf_size); 94 94 qnx6_put_page(page); 95 95 return 0; 96 96 } ··· 99 99 mmi 3g filesystem does not have that checksum */ 100 100 if (!test_opt(s, MMI_FS) && fs32_to_cpu(sbi, de->de_checksum) != 101 101 qnx6_lfile_checksum(lf->lf_fname, lf_size)) 102 - pr_info("qnx6: long filename checksum error.\n"); 102 + pr_info("long filename checksum error.\n"); 103 103 104 104 QNX6DEBUG((KERN_INFO "qnx6_readdir:%.*s inode:%u\n", 105 105 lf_size, lf->lf_fname, de_inode)); ··· 135 135 int i = start; 136 136 137 137 if (IS_ERR(page)) { 138 - pr_err("qnx6_readdir: read failed\n"); 138 + pr_err("%s(): read failed\n", __func__); 139 139 ctx->pos = (n + 1) << PAGE_CACHE_SHIFT; 140 140 return PTR_ERR(page); 141 141 } ··· 258 258 if (ino) 259 259 goto found; 260 260 } else 261 - pr_err("qnx6: undefined filename size in inode.\n"); 261 + pr_err("undefined filename size in inode.\n"); 262 262 } 263 263 qnx6_put_page(page); 264 264 }
+22 -22
fs/qnx6/inode.c
··· 87 87 static int qnx6_check_blockptr(__fs32 ptr) 88 88 { 89 89 if (ptr == ~(__fs32)0) { 90 - pr_err("qnx6: hit unused blockpointer.\n"); 90 + pr_err("hit unused blockpointer.\n"); 91 91 return 0; 92 92 } 93 93 return 1; ··· 127 127 levelptr = no >> bitdelta; 128 128 129 129 if (levelptr > QNX6_NO_DIRECT_POINTERS - 1) { 130 - pr_err("qnx6:Requested file block number (%u) too big.", no); 130 + pr_err("Requested file block number (%u) too big.", no); 131 131 return 0; 132 132 } 133 133 ··· 136 136 for (i = 0; i < depth; i++) { 137 137 bh = sb_bread(s, block); 138 138 if (!bh) { 139 - pr_err("qnx6:Error reading block (%u)\n", block); 139 + pr_err("Error reading block (%u)\n", block); 140 140 return 0; 141 141 } 142 142 bitdelta -= ptrbits; ··· 275 275 start with the first superblock */ 276 276 bh = sb_bread(s, offset); 277 277 if (!bh) { 278 - pr_err("qnx6: unable to read the first superblock\n"); 278 + pr_err("unable to read the first superblock\n"); 279 279 return NULL; 280 280 } 281 281 sb = (struct qnx6_super_block *)bh->b_data; ··· 290 290 sbi->s_bytesex = BYTESEX_LE; 291 291 if (!silent) { 292 292 if (offset == 0) { 293 - pr_err("qnx6: wrong signature (magic) in superblock #1.\n"); 293 + pr_err("wrong signature (magic) in superblock #1.\n"); 294 294 } else { 295 - pr_info("qnx6: wrong signature (magic) at position (0x%lx) - will try alternative position (0x0000).\n", 295 + pr_info("wrong signature (magic) at position (0x%lx) - will try alternative position (0x0000).\n", 296 296 offset * s->s_blocksize); 297 297 } 298 298 } ··· 324 324 325 325 /* Superblock always is 512 Byte long */ 326 326 if (!sb_set_blocksize(s, QNX6_SUPERBLOCK_SIZE)) { 327 - pr_err("qnx6: unable to set blocksize\n"); 327 + pr_err("unable to set blocksize\n"); 328 328 goto outnobh; 329 329 } 330 330 331 331 /* parse the mount-options */ 332 332 if (!qnx6_parse_options((char *) data, s)) { 333 - pr_err("qnx6: invalid mount options.\n"); 333 + pr_err("invalid mount options.\n"); 334 334 goto outnobh; 335 335 } 336 336 if (test_opt(s, MMI_FS)) { ··· 350 350 /* try again without bootblock offset */ 351 351 bh1 = qnx6_check_first_superblock(s, 0, silent); 352 352 if (!bh1) { 353 - pr_err("qnx6: unable to read the first superblock\n"); 353 + pr_err("unable to read the first superblock\n"); 354 354 goto outnobh; 355 355 } 356 356 /* seems that no bootblock at partition start */ ··· 365 365 /* checksum check - start at byte 8 and end at byte 512 */ 366 366 if (fs32_to_cpu(sbi, sb1->sb_checksum) != 367 367 crc32_be(0, (char *)(bh1->b_data + 8), 504)) { 368 - pr_err("qnx6: superblock #1 checksum error\n"); 368 + pr_err("superblock #1 checksum error\n"); 369 369 goto out; 370 370 } 371 371 372 372 /* set new blocksize */ 373 373 if (!sb_set_blocksize(s, fs32_to_cpu(sbi, sb1->sb_blocksize))) { 374 - pr_err("qnx6: unable to set blocksize\n"); 374 + pr_err("unable to set blocksize\n"); 375 375 goto out; 376 376 } 377 377 /* blocksize invalidates bh - pull it back in */ ··· 393 393 /* next the second superblock */ 394 394 bh2 = sb_bread(s, offset); 395 395 if (!bh2) { 396 - pr_err("qnx6: unable to read the second superblock\n"); 396 + pr_err("unable to read the second superblock\n"); 397 397 goto out; 398 398 } 399 399 sb2 = (struct qnx6_super_block *)bh2->b_data; 400 400 if (fs32_to_cpu(sbi, sb2->sb_magic) != QNX6_SUPER_MAGIC) { 401 401 if (!silent) 402 - pr_err("qnx6: wrong signature (magic) in superblock #2.\n"); 402 + pr_err("wrong signature (magic) in superblock #2.\n"); 403 403 goto out; 404 404 } 405 405 406 406 /* checksum check - start at byte 8 and end at byte 512 */ 407 407 if (fs32_to_cpu(sbi, sb2->sb_checksum) != 408 408 crc32_be(0, (char *)(bh2->b_data + 8), 504)) { 409 - pr_err("qnx6: superblock #2 checksum error\n"); 409 + pr_err("superblock #2 checksum error\n"); 410 410 goto out; 411 411 } 412 412 ··· 416 416 sbi->sb_buf = bh1; 417 417 sbi->sb = (struct qnx6_super_block *)bh1->b_data; 418 418 brelse(bh2); 419 - pr_info("qnx6: superblock #1 active\n"); 419 + pr_info("superblock #1 active\n"); 420 420 } else { 421 421 /* superblock #2 active */ 422 422 sbi->sb_buf = bh2; 423 423 sbi->sb = (struct qnx6_super_block *)bh2->b_data; 424 424 brelse(bh1); 425 - pr_info("qnx6: superblock #2 active\n"); 425 + pr_info("superblock #2 active\n"); 426 426 } 427 427 mmi_success: 428 428 /* sanity check - limit maximum indirect pointer levels */ 429 429 if (sb1->Inode.levels > QNX6_PTR_MAX_LEVELS) { 430 - pr_err("qnx6: too many inode levels (max %i, sb %i)\n", 430 + pr_err("too many inode levels (max %i, sb %i)\n", 431 431 QNX6_PTR_MAX_LEVELS, sb1->Inode.levels); 432 432 goto out; 433 433 } 434 434 if (sb1->Longfile.levels > QNX6_PTR_MAX_LEVELS) { 435 - pr_err("qnx6: too many longfilename levels (max %i, sb %i)\n", 435 + pr_err("too many longfilename levels (max %i, sb %i)\n", 436 436 QNX6_PTR_MAX_LEVELS, sb1->Longfile.levels); 437 437 goto out; 438 438 } ··· 453 453 /* prefetch root inode */ 454 454 root = qnx6_iget(s, QNX6_ROOT_INO); 455 455 if (IS_ERR(root)) { 456 - pr_err("qnx6: get inode failed\n"); 456 + pr_err("get inode failed\n"); 457 457 ret = PTR_ERR(root); 458 458 goto out2; 459 459 } ··· 467 467 errmsg = qnx6_checkroot(s); 468 468 if (errmsg != NULL) { 469 469 if (!silent) 470 - pr_err("qnx6: %s\n", errmsg); 470 + pr_err("%s\n", errmsg); 471 471 goto out3; 472 472 } 473 473 return 0; ··· 548 548 inode->i_mode = 0; 549 549 550 550 if (ino == 0) { 551 - pr_err("qnx6: bad inode number on dev %s: %u is out of range\n", 551 + pr_err("bad inode number on dev %s: %u is out of range\n", 552 552 sb->s_id, ino); 553 553 iget_failed(inode); 554 554 return ERR_PTR(-EIO); ··· 558 558 mapping = sbi->inodes->i_mapping; 559 559 page = read_mapping_page(mapping, n, NULL); 560 560 if (IS_ERR(page)) { 561 - pr_err("qnx6: major problem: unable to read inode from dev %s\n", 561 + pr_err("major problem: unable to read inode from dev %s\n", 562 562 sb->s_id); 563 563 iget_failed(inode); 564 564 return ERR_CAST(page);
+6
fs/qnx6/qnx6.h
··· 10 10 * 11 11 */ 12 12 13 + #ifdef pr_fmt 14 + #undef pr_fmt 15 + #endif 16 + 17 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 18 + 13 19 #include <linux/fs.h> 14 20 #include <linux/pagemap.h> 15 21
+10 -10
fs/qnx6/super_mmi.c
··· 44 44 start with the first superblock */ 45 45 bh1 = sb_bread(s, 0); 46 46 if (!bh1) { 47 - pr_err("qnx6: Unable to read first mmi superblock\n"); 47 + pr_err("Unable to read first mmi superblock\n"); 48 48 return NULL; 49 49 } 50 50 sb1 = (struct qnx6_mmi_super_block *)bh1->b_data; 51 51 sbi = QNX6_SB(s); 52 52 if (fs32_to_cpu(sbi, sb1->sb_magic) != QNX6_SUPER_MAGIC) { 53 53 if (!silent) { 54 - pr_err("qnx6: wrong signature (magic) in superblock #1.\n"); 54 + pr_err("wrong signature (magic) in superblock #1.\n"); 55 55 goto out; 56 56 } 57 57 } ··· 59 59 /* checksum check - start at byte 8 and end at byte 512 */ 60 60 if (fs32_to_cpu(sbi, sb1->sb_checksum) != 61 61 crc32_be(0, (char *)(bh1->b_data + 8), 504)) { 62 - pr_err("qnx6: superblock #1 checksum error\n"); 62 + pr_err("superblock #1 checksum error\n"); 63 63 goto out; 64 64 } 65 65 ··· 69 69 70 70 /* set new blocksize */ 71 71 if (!sb_set_blocksize(s, fs32_to_cpu(sbi, sb1->sb_blocksize))) { 72 - pr_err("qnx6: unable to set blocksize\n"); 72 + pr_err("unable to set blocksize\n"); 73 73 goto out; 74 74 } 75 75 /* blocksize invalidates bh - pull it back in */ ··· 82 82 /* read second superblock */ 83 83 bh2 = sb_bread(s, offset); 84 84 if (!bh2) { 85 - pr_err("qnx6: unable to read the second superblock\n"); 85 + pr_err("unable to read the second superblock\n"); 86 86 goto out; 87 87 } 88 88 sb2 = (struct qnx6_mmi_super_block *)bh2->b_data; 89 89 if (fs32_to_cpu(sbi, sb2->sb_magic) != QNX6_SUPER_MAGIC) { 90 90 if (!silent) 91 - pr_err("qnx6: wrong signature (magic) in superblock #2.\n"); 91 + pr_err("wrong signature (magic) in superblock #2.\n"); 92 92 goto out; 93 93 } 94 94 95 95 /* checksum check - start at byte 8 and end at byte 512 */ 96 96 if (fs32_to_cpu(sbi, sb2->sb_checksum) 97 97 != crc32_be(0, (char *)(bh2->b_data + 8), 504)) { 98 - pr_err("qnx6: superblock #1 checksum error\n"); 98 + pr_err("superblock #1 checksum error\n"); 99 99 goto out; 100 100 } 101 101 102 102 qsb = kmalloc(sizeof(*qsb), GFP_KERNEL); 103 103 if (!qsb) { 104 - pr_err("qnx6: unable to allocate memory.\n"); 104 + pr_err("unable to allocate memory.\n"); 105 105 goto out; 106 106 } 107 107 ··· 117 117 sbi->sb_buf = bh1; 118 118 sbi->sb = (struct qnx6_super_block *)bh1->b_data; 119 119 brelse(bh2); 120 - pr_info("qnx6: superblock #1 active\n"); 120 + pr_info("superblock #1 active\n"); 121 121 } else { 122 122 /* superblock #2 active */ 123 123 qnx6_mmi_copy_sb(qsb, sb2); ··· 129 129 sbi->sb_buf = bh2; 130 130 sbi->sb = (struct qnx6_super_block *)bh2->b_data; 131 131 brelse(bh1); 132 - pr_info("qnx6: superblock #2 active\n"); 132 + pr_info("superblock #2 active\n"); 133 133 } 134 134 kfree(qsb); 135 135