File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020#include <linux/iomap.h>
2121#include "erofs_fs.h"
2222
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 , ...);
2924#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__)
3326#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+
3529#ifdef CONFIG_EROFS_FS_DEBUG
3630#define DBG_BUGON BUG_ON
3731#else
Original file line number Diff line number Diff line change 1818
1919static struct kmem_cache * erofs_inode_cachep __read_mostly ;
2020
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 , ...)
2222{
2323 struct va_format vaf ;
2424 va_list args ;
25+ int level ;
2526
2627 va_start (args , fmt );
2728
28- vaf .fmt = fmt ;
29+ level = printk_get_level (fmt );
30+ vaf .fmt = printk_skip_level (fmt );
2931 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-
4832 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 );
5035 else
51- pr_info ("%pV" , & vaf );
36+ printk ("%c%cerofs: % pV" , KERN_SOH_ASCII , level , & vaf );
5237 va_end (args );
5338}
5439
You can’t perform that action at this time.
0 commit comments