On 2024/10/16 23:24, Gou Hao wrote:
remove the macro of the log declarations.

Signed-off-by: Gou Hao <gou...@uniontech.com>
---
  fs/erofs/internal.h | 13 +++++--------
  fs/erofs/super.c    | 12 ++++++------
  2 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/fs/erofs/internal.h b/fs/erofs/internal.h
index 4efd578d7c62..0c3d6b9f85b5 100644
--- a/fs/erofs/internal.h
+++ b/fs/erofs/internal.h
@@ -24,14 +24,11 @@
  #undef pr_fmt
  #define pr_fmt(fmt) "erofs: " fmt
-__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__)
+#define erofs_log_declare(name) \
+       __printf(2, 3) void erofs_##name(struct super_block *sb, const char 
*fmt, ...)
+erofs_log_declare(err);
+erofs_log_declare(info);

I guess it will make the code harder to read IMHO..

Thanks,
Gao Xiang

Reply via email to