Skip to content

Commit 4f21e1e

Browse files
Fabian Fredericktorvalds
authored andcommitted
fs/cramfs: use pr_fmt
Use module name for "cramfs: " prefix. (note that uncompress.c printk had no prefix). 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 f175ff8 commit 4f21e1e

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

‎fs/cramfs/inode.c‎

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
* The actual compression is based on zlib, see the other files.
1212
*/
1313

14+
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
15+
1416
#include <linux/module.h>
1517
#include <linux/fs.h>
1618
#include <linux/pagemap.h>
@@ -277,7 +279,7 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent)
277279
/* check for wrong endianness */
278280
if (super.magic == CRAMFS_MAGIC_WEND) {
279281
if (!silent)
280-
pr_err("cramfs: wrong endianness\n");
282+
pr_err("wrong endianness\n");
281283
return -EINVAL;
282284
}
283285

@@ -287,22 +289,22 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent)
287289
mutex_unlock(&read_mutex);
288290
if (super.magic != CRAMFS_MAGIC) {
289291
if (super.magic == CRAMFS_MAGIC_WEND && !silent)
290-
pr_err("cramfs: wrong endianness\n");
292+
pr_err("wrong endianness\n");
291293
else if (!silent)
292-
pr_err("cramfs: wrong magic\n");
294+
pr_err("wrong magic\n");
293295
return -EINVAL;
294296
}
295297
}
296298

297299
/* get feature flags first */
298300
if (super.flags & ~CRAMFS_SUPPORTED_FLAGS) {
299-
pr_err("cramfs: unsupported filesystem features\n");
301+
pr_err("unsupported filesystem features\n");
300302
return -EINVAL;
301303
}
302304

303305
/* Check that the root inode is in a sane state */
304306
if (!S_ISDIR(super.root.mode)) {
305-
pr_err("cramfs: root is not a directory\n");
307+
pr_err("root is not a directory\n");
306308
return -EINVAL;
307309
}
308310
/* correct strange, hard-coded permissions of mkcramfs */
@@ -321,12 +323,12 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent)
321323
sbi->magic=super.magic;
322324
sbi->flags=super.flags;
323325
if (root_offset == 0)
324-
pr_info("cramfs: empty filesystem");
326+
pr_info("empty filesystem");
325327
else if (!(super.flags & CRAMFS_FLAG_SHIFTED_ROOT_OFFSET) &&
326328
((root_offset != sizeof(struct cramfs_super)) &&
327329
(root_offset != 512 + sizeof(struct cramfs_super))))
328330
{
329-
pr_err("cramfs: bad root offset %lu\n", root_offset);
331+
pr_err("bad root offset %lu\n", root_offset);
330332
return -EINVAL;
331333
}
332334

@@ -511,7 +513,7 @@ static int cramfs_readpage(struct file *file, struct page * page)
511513
if (compr_len == 0)
512514
; /* hole */
513515
else if (unlikely(compr_len > (PAGE_CACHE_SIZE << 1))) {
514-
pr_err("cramfs: bad compressed blocksize %u\n",
516+
pr_err("bad compressed blocksize %u\n",
515517
compr_len);
516518
goto err;
517519
} else {

‎fs/cramfs/uncompress.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* then is used by multiple filesystems.
1616
*/
1717

18+
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
19+
1820
#include <linux/kernel.h>
1921
#include <linux/errno.h>
2022
#include <linux/vmalloc.h>

0 commit comments

Comments
 (0)