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

fs/qnx6: update debugging to current functions

Add DDEBUG in Makefile when CONFIG_QNX6FS_DEBUG is set. All QNX6DEBUG
messages are replaced by pr_debug which means debugging will be emitted in
debug level only and no more in error and info levels. debug uses now
pr_fmt and __func__

QNX6DEBUG definition has been removed.

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
fa5a7a41 e6c32616

+23 -39
+1
fs/qnx6/Makefile
··· 5 5 obj-$(CONFIG_QNX6FS_FS) += qnx6.o 6 6 7 7 qnx6-objs := inode.o dir.o namei.o super_mmi.o 8 + ccflags-$(CONFIG_QNX6FS_DEBUG) += -DDEBUG
+6 -6
fs/qnx6/dir.c
··· 89 89 lf_size = fs16_to_cpu(sbi, lf->lf_size); 90 90 91 91 if (lf_size > QNX6_LONG_NAME_MAX) { 92 - QNX6DEBUG((KERN_INFO "file %s\n", lf->lf_fname)); 92 + pr_debug("file %s\n", lf->lf_fname); 93 93 pr_err("Filename too long (%i)\n", lf_size); 94 94 qnx6_put_page(page); 95 95 return 0; ··· 101 101 qnx6_lfile_checksum(lf->lf_fname, lf_size)) 102 102 pr_info("long filename checksum error.\n"); 103 103 104 - QNX6DEBUG((KERN_INFO "qnx6_readdir:%.*s inode:%u\n", 105 - lf_size, lf->lf_fname, de_inode)); 104 + pr_debug("qnx6_readdir:%.*s inode:%u\n", 105 + lf_size, lf->lf_fname, de_inode); 106 106 if (!dir_emit(ctx, lf->lf_fname, lf_size, de_inode, DT_UNKNOWN)) { 107 107 qnx6_put_page(page); 108 108 return 0; ··· 158 158 break; 159 159 } 160 160 } else { 161 - QNX6DEBUG((KERN_INFO "qnx6_readdir:%.*s" 162 - " inode:%u\n", size, de->de_fname, 163 - no_inode)); 161 + pr_debug("%s():%.*s inode:%u\n", 162 + __func__, size, de->de_fname, 163 + no_inode); 164 164 if (!dir_emit(ctx, de->de_fname, size, 165 165 no_inode, DT_UNKNOWN)) { 166 166 done = true;
+13 -24
fs/qnx6/inode.c
··· 73 73 { 74 74 unsigned phys; 75 75 76 - QNX6DEBUG((KERN_INFO "qnx6: qnx6_get_block inode=[%ld] iblock=[%ld]\n", 77 - inode->i_ino, (unsigned long)iblock)); 76 + pr_debug("qnx6_get_block inode=[%ld] iblock=[%ld]\n", 77 + inode->i_ino, (unsigned long)iblock); 78 78 79 79 phys = qnx6_block_map(inode, iblock); 80 80 if (phys) { ··· 205 205 { 206 206 struct qnx6_sb_info *sbi = QNX6_SB(s); 207 207 208 - QNX6DEBUG((KERN_INFO "magic: %08x\n", 209 - fs32_to_cpu(sbi, sb->sb_magic))); 210 - QNX6DEBUG((KERN_INFO "checksum: %08x\n", 211 - fs32_to_cpu(sbi, sb->sb_checksum))); 212 - QNX6DEBUG((KERN_INFO "serial: %llx\n", 213 - fs64_to_cpu(sbi, sb->sb_serial))); 214 - QNX6DEBUG((KERN_INFO "flags: %08x\n", 215 - fs32_to_cpu(sbi, sb->sb_flags))); 216 - QNX6DEBUG((KERN_INFO "blocksize: %08x\n", 217 - fs32_to_cpu(sbi, sb->sb_blocksize))); 218 - QNX6DEBUG((KERN_INFO "num_inodes: %08x\n", 219 - fs32_to_cpu(sbi, sb->sb_num_inodes))); 220 - QNX6DEBUG((KERN_INFO "free_inodes: %08x\n", 221 - fs32_to_cpu(sbi, sb->sb_free_inodes))); 222 - QNX6DEBUG((KERN_INFO "num_blocks: %08x\n", 223 - fs32_to_cpu(sbi, sb->sb_num_blocks))); 224 - QNX6DEBUG((KERN_INFO "free_blocks: %08x\n", 225 - fs32_to_cpu(sbi, sb->sb_free_blocks))); 226 - QNX6DEBUG((KERN_INFO "inode_levels: %02x\n", 227 - sb->Inode.levels)); 208 + pr_debug("magic: %08x\n", fs32_to_cpu(sbi, sb->sb_magic)); 209 + pr_debug("checksum: %08x\n", fs32_to_cpu(sbi, sb->sb_checksum)); 210 + pr_debug("serial: %llx\n", fs64_to_cpu(sbi, sb->sb_serial)); 211 + pr_debug("flags: %08x\n", fs32_to_cpu(sbi, sb->sb_flags)); 212 + pr_debug("blocksize: %08x\n", fs32_to_cpu(sbi, sb->sb_blocksize)); 213 + pr_debug("num_inodes: %08x\n", fs32_to_cpu(sbi, sb->sb_num_inodes)); 214 + pr_debug("free_inodes: %08x\n", fs32_to_cpu(sbi, sb->sb_free_inodes)); 215 + pr_debug("num_blocks: %08x\n", fs32_to_cpu(sbi, sb->sb_num_blocks)); 216 + pr_debug("free_blocks: %08x\n", fs32_to_cpu(sbi, sb->sb_free_blocks)); 217 + pr_debug("inode_levels: %02x\n", sb->Inode.levels); 228 218 } 229 219 #endif 230 220 ··· 273 283 sbi->s_bytesex = BYTESEX_BE; 274 284 if (fs32_to_cpu(sbi, sb->sb_magic) == QNX6_SUPER_MAGIC) { 275 285 /* we got a big endian fs */ 276 - QNX6DEBUG((KERN_INFO "qnx6: fs got different" 277 - " endianness.\n")); 286 + pr_debug("fs got different endianness.\n"); 278 287 return bh; 279 288 } else 280 289 sbi->s_bytesex = BYTESEX_LE;
+3 -3
fs/qnx6/namei.c
··· 29 29 foundinode = qnx6_iget(dir->i_sb, ino); 30 30 qnx6_put_page(page); 31 31 if (IS_ERR(foundinode)) { 32 - QNX6DEBUG((KERN_ERR "qnx6: lookup->iget -> " 33 - " error %ld\n", PTR_ERR(foundinode))); 32 + pr_debug("lookup->iget -> error %ld\n", 33 + PTR_ERR(foundinode)); 34 34 return ERR_CAST(foundinode); 35 35 } 36 36 } else { 37 - QNX6DEBUG((KERN_INFO "qnx6_lookup: not found %s\n", name)); 37 + pr_debug("%s(): not found %s\n", __func__, name); 38 38 return NULL; 39 39 } 40 40 d_add(dentry, foundinode);
-6
fs/qnx6/qnx6.h
··· 25 25 26 26 #include <linux/qnx6_fs.h> 27 27 28 - #ifdef CONFIG_QNX6FS_DEBUG 29 - #define QNX6DEBUG(X) printk X 30 - #else 31 - #define QNX6DEBUG(X) (void) 0 32 - #endif 33 - 34 28 struct qnx6_sb_info { 35 29 struct buffer_head *sb_buf; /* superblock buffer */ 36 30 struct qnx6_super_block *sb; /* our superblock */