erofs: rename errln/infoln/debugln to erofs_{err, info, dbg}
Add prefix "erofs_" to these functions and print sb->s_id as a prefix to erofs_{err, info} so that the user knows which file system is affected. Reported-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Link: https://lore.kernel.org/r/20190904020912.63925-23-gaoxiang25@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
84947eb603
commit
4f761fa253
@@ -22,13 +22,19 @@
|
||||
#undef pr_fmt
|
||||
#define pr_fmt(fmt) "erofs: " fmt
|
||||
|
||||
#define errln(x, ...) pr_err(x "\n", ##__VA_ARGS__)
|
||||
#define infoln(x, ...) pr_info(x "\n", ##__VA_ARGS__)
|
||||
__printf(3, 4) void _erofs_err(struct super_block *sb,
|
||||
const char *function, const char *fmt, ...);
|
||||
#define erofs_err(sb, fmt, ...) \
|
||||
_erofs_err(sb, __func__, fmt "\n", ##__VA_ARGS__)
|
||||
__printf(3, 4) void _erofs_info(struct super_block *sb,
|
||||
const char *function, const char *fmt, ...);
|
||||
#define erofs_info(sb, fmt, ...) \
|
||||
_erofs_info(sb, __func__, fmt "\n", ##__VA_ARGS__)
|
||||
#ifdef CONFIG_EROFS_FS_DEBUG
|
||||
#define debugln(x, ...) pr_debug(x "\n", ##__VA_ARGS__)
|
||||
#define erofs_dbg(x, ...) pr_debug(x "\n", ##__VA_ARGS__)
|
||||
#define DBG_BUGON BUG_ON
|
||||
#else
|
||||
#define debugln(x, ...) ((void)0)
|
||||
#define erofs_dbg(x, ...) ((void)0)
|
||||
#define DBG_BUGON(x) ((void)(x))
|
||||
#endif /* !CONFIG_EROFS_FS_DEBUG */
|
||||
|
||||
|
Reference in New Issue
Block a user