Skip to content

Commit f175ff8

Browse files
Fabian Fredericktorvalds
authored andcommitted
fs/cramfs: convert printk to pr_foo()
Use current logging functions. No level printk converted to pr_err Signed-off-by: Fabian Frederick <fabf@skynet.be> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 8b6aaf6 commit f175ff8

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

‎fs/cramfs/inode.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent)
277277
/* check for wrong endianness */
278278
if (super.magic == CRAMFS_MAGIC_WEND) {
279279
if (!silent)
280-
printk(KERN_ERR "cramfs: wrong endianness\n");
280+
pr_err("cramfs: wrong endianness\n");
281281
return -EINVAL;
282282
}
283283

@@ -287,22 +287,22 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent)
287287
mutex_unlock(&read_mutex);
288288
if (super.magic != CRAMFS_MAGIC) {
289289
if (super.magic == CRAMFS_MAGIC_WEND && !silent)
290-
printk(KERN_ERR "cramfs: wrong endianness\n");
290+
pr_err("cramfs: wrong endianness\n");
291291
else if (!silent)
292-
printk(KERN_ERR "cramfs: wrong magic\n");
292+
pr_err("cramfs: wrong magic\n");
293293
return -EINVAL;
294294
}
295295
}
296296

297297
/* get feature flags first */
298298
if (super.flags & ~CRAMFS_SUPPORTED_FLAGS) {
299-
printk(KERN_ERR "cramfs: unsupported filesystem features\n");
299+
pr_err("cramfs: unsupported filesystem features\n");
300300
return -EINVAL;
301301
}
302302

303303
/* Check that the root inode is in a sane state */
304304
if (!S_ISDIR(super.root.mode)) {
305-
printk(KERN_ERR "cramfs: root is not a directory\n");
305+
pr_err("cramfs: root is not a directory\n");
306306
return -EINVAL;
307307
}
308308
/* correct strange, hard-coded permissions of mkcramfs */
@@ -321,12 +321,12 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent)
321321
sbi->magic=super.magic;
322322
sbi->flags=super.flags;
323323
if (root_offset == 0)
324-
printk(KERN_INFO "cramfs: empty filesystem");
324+
pr_info("cramfs: empty filesystem");
325325
else if (!(super.flags & CRAMFS_FLAG_SHIFTED_ROOT_OFFSET) &&
326326
((root_offset != sizeof(struct cramfs_super)) &&
327327
(root_offset != 512 + sizeof(struct cramfs_super))))
328328
{
329-
printk(KERN_ERR "cramfs: bad root offset %lu\n", root_offset);
329+
pr_err("cramfs: bad root offset %lu\n", root_offset);
330330
return -EINVAL;
331331
}
332332

‎fs/cramfs/uncompress.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ int cramfs_uncompress_block(void *dst, int dstlen, void *src, int srclen)
3737

3838
err = zlib_inflateReset(&stream);
3939
if (err != Z_OK) {
40-
printk("zlib_inflateReset error %d\n", err);
40+
pr_err("zlib_inflateReset error %d\n", err);
4141
zlib_inflateEnd(&stream);
4242
zlib_inflateInit(&stream);
4343
}
@@ -48,8 +48,8 @@ int cramfs_uncompress_block(void *dst, int dstlen, void *src, int srclen)
4848
return stream.total_out;
4949

5050
err:
51-
printk("Error %d while decompressing!\n", err);
52-
printk("%p(%d)->%p(%d)\n", src, srclen, dst, dstlen);
51+
pr_err("Error %d while decompressing!\n", err);
52+
pr_err("%p(%d)->%p(%d)\n", src, srclen, dst, dstlen);
5353
return -EIO;
5454
}
5555

0 commit comments

Comments
 (0)