File tree Expand file tree Collapse file tree 2 files changed +11
-32
lines changed Expand file tree Collapse file tree 2 files changed +11
-32
lines changed Original file line number Diff line number Diff line change 20
20
#include <linux/iomap.h>
21
21
#include "erofs_fs.h"
22
22
23
- /* redefine pr_fmt "erofs: " */
24
- #undef pr_fmt
25
- #define pr_fmt (fmt ) "erofs: " fmt
26
-
27
- __printf (3 , 4 ) void _erofs_err (struct super_block * sb ,
28
- const char * function , const char * fmt , ...);
23
+ __printf (2 , 3 ) void _erofs_printk (struct super_block * sb , const char * fmt , ...);
29
24
#define erofs_err (sb , fmt , ...) \
30
- _erofs_err(sb, __func__, fmt "\n", ##__VA_ARGS__)
31
- __printf (3 , 4 ) void _erofs_info (struct super_block * sb ,
32
- const char * function , const char * fmt , ...);
25
+ _erofs_printk(sb, KERN_ERR fmt "\n", ##__VA_ARGS__)
33
26
#define erofs_info (sb , fmt , ...) \
34
- _erofs_info(sb, __func__, fmt "\n", ##__VA_ARGS__)
27
+ _erofs_printk(sb, KERN_INFO fmt "\n", ##__VA_ARGS__)
28
+
35
29
#ifdef CONFIG_EROFS_FS_DEBUG
36
30
#define DBG_BUGON BUG_ON
37
31
#else
Original file line number Diff line number Diff line change 18
18
19
19
static struct kmem_cache * erofs_inode_cachep __read_mostly ;
20
20
21
- void _erofs_err (struct super_block * sb , const char * func , const char * fmt , ...)
21
+ void _erofs_printk (struct super_block * sb , const char * fmt , ...)
22
22
{
23
23
struct va_format vaf ;
24
24
va_list args ;
25
+ int level ;
25
26
26
27
va_start (args , fmt );
27
28
28
- vaf .fmt = fmt ;
29
+ level = printk_get_level (fmt );
30
+ vaf .fmt = printk_skip_level (fmt );
29
31
vaf .va = & args ;
30
-
31
- if (sb )
32
- pr_err ("(device %s): %s: %pV" , sb -> s_id , func , & vaf );
33
- else
34
- pr_err ("%s: %pV" , func , & vaf );
35
- va_end (args );
36
- }
37
-
38
- void _erofs_info (struct super_block * sb , const char * func , const char * fmt , ...)
39
- {
40
- struct va_format vaf ;
41
- va_list args ;
42
-
43
- va_start (args , fmt );
44
-
45
- vaf .fmt = fmt ;
46
- vaf .va = & args ;
47
-
48
32
if (sb )
49
- pr_info ("(device %s): %pV" , sb -> s_id , & vaf );
33
+ printk ("%c%cerofs (device %s): %pV" ,
34
+ KERN_SOH_ASCII , level , sb -> s_id , & vaf );
50
35
else
51
- pr_info ("%pV" , & vaf );
36
+ printk ("%c%cerofs: % pV" , KERN_SOH_ASCII , level , & vaf );
52
37
va_end (args );
53
38
}
54
39
You can’t perform that action at this time.
0 commit comments