aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cramfs
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-08-08 17:22:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-08 18:57:25 -0400
commitf175ff8100eef0eb4b946c08e78a27bd17ca5896 (patch)
tree3f502964a3b59a8eee7cdbfbe0467581134f0d01 /fs/cramfs
parent8b6aaf65d3b001ec9b5dcba0992b3b68cbf6057f (diff)
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>
Diffstat (limited to 'fs/cramfs')
-rw-r--r--fs/cramfs/inode.c14
-rw-r--r--fs/cramfs/uncompress.c6
2 files changed, 10 insertions, 10 deletions
diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c
index ddcfe590b8a8..480fcb8e7d6c 100644
--- a/fs/cramfs/inode.c
+++ b/fs/cramfs/inode.c
@@ -277,7 +277,7 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent)
277 /* check for wrong endianness */ 277 /* check for wrong endianness */
278 if (super.magic == CRAMFS_MAGIC_WEND) { 278 if (super.magic == CRAMFS_MAGIC_WEND) {
279 if (!silent) 279 if (!silent)
280 printk(KERN_ERR "cramfs: wrong endianness\n"); 280 pr_err("cramfs: wrong endianness\n");
281 return -EINVAL; 281 return -EINVAL;
282 } 282 }
283 283
@@ -287,22 +287,22 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent)
287 mutex_unlock(&read_mutex); 287 mutex_unlock(&read_mutex);
288 if (super.magic != CRAMFS_MAGIC) { 288 if (super.magic != CRAMFS_MAGIC) {
289 if (super.magic == CRAMFS_MAGIC_WEND && !silent) 289 if (super.magic == CRAMFS_MAGIC_WEND && !silent)
290 printk(KERN_ERR "cramfs: wrong endianness\n"); 290 pr_err("cramfs: wrong endianness\n");
291 else if (!silent) 291 else if (!silent)
292 printk(KERN_ERR "cramfs: wrong magic\n"); 292 pr_err("cramfs: wrong magic\n");
293 return -EINVAL; 293 return -EINVAL;
294 } 294 }
295 } 295 }
296 296
297 /* get feature flags first */ 297 /* get feature flags first */
298 if (super.flags & ~CRAMFS_SUPPORTED_FLAGS) { 298 if (super.flags & ~CRAMFS_SUPPORTED_FLAGS) {
299 printk(KERN_ERR "cramfs: unsupported filesystem features\n"); 299 pr_err("cramfs: unsupported filesystem features\n");
300 return -EINVAL; 300 return -EINVAL;
301 } 301 }
302 302
303 /* Check that the root inode is in a sane state */ 303 /* Check that the root inode is in a sane state */
304 if (!S_ISDIR(super.root.mode)) { 304 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");
306 return -EINVAL; 306 return -EINVAL;
307 } 307 }
308 /* correct strange, hard-coded permissions of mkcramfs */ 308 /* correct strange, hard-coded permissions of mkcramfs */
@@ -321,12 +321,12 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent)
321 sbi->magic=super.magic; 321 sbi->magic=super.magic;
322 sbi->flags=super.flags; 322 sbi->flags=super.flags;
323 if (root_offset == 0) 323 if (root_offset == 0)
324 printk(KERN_INFO "cramfs: empty filesystem"); 324 pr_info("cramfs: empty filesystem");
325 else if (!(super.flags & CRAMFS_FLAG_SHIFTED_ROOT_OFFSET) && 325 else if (!(super.flags & CRAMFS_FLAG_SHIFTED_ROOT_OFFSET) &&
326 ((root_offset != sizeof(struct cramfs_super)) && 326 ((root_offset != sizeof(struct cramfs_super)) &&
327 (root_offset != 512 + sizeof(struct cramfs_super)))) 327 (root_offset != 512 + sizeof(struct cramfs_super))))
328 { 328 {
329 printk(KERN_ERR "cramfs: bad root offset %lu\n", root_offset); 329 pr_err("cramfs: bad root offset %lu\n", root_offset);
330 return -EINVAL; 330 return -EINVAL;
331 } 331 }
332 332
diff --git a/fs/cramfs/uncompress.c b/fs/cramfs/uncompress.c
index 1760c1b84d97..76428ccab157 100644
--- a/fs/cramfs/uncompress.c
+++ b/fs/cramfs/uncompress.c
@@ -37,7 +37,7 @@ int cramfs_uncompress_block(void *dst, int dstlen, void *src, int srclen)
37 37
38 err = zlib_inflateReset(&stream); 38 err = zlib_inflateReset(&stream);
39 if (err != Z_OK) { 39 if (err != Z_OK) {
40 printk("zlib_inflateReset error %d\n", err); 40 pr_err("zlib_inflateReset error %d\n", err);
41 zlib_inflateEnd(&stream); 41 zlib_inflateEnd(&stream);
42 zlib_inflateInit(&stream); 42 zlib_inflateInit(&stream);
43 } 43 }
@@ -48,8 +48,8 @@ int cramfs_uncompress_block(void *dst, int dstlen, void *src, int srclen)
48 return stream.total_out; 48 return stream.total_out;
49 49
50err: 50err:
51 printk("Error %d while decompressing!\n", err); 51 pr_err("Error %d while decompressing!\n", err);
52 printk("%p(%d)->%p(%d)\n", src, srclen, dst, dstlen); 52 pr_err("%p(%d)->%p(%d)\n", src, srclen, dst, dstlen);
53 return -EIO; 53 return -EIO;
54} 54}
55 55