@@ -64,8 +64,7 @@ static ssize_t mlog_mask_store(u64 mask, const char *buf, size_t count)
return count;
}
-void __mlog_printk(const u64 *mask, const char *func, int line,
- const char *fmt, ...)
+void __mlog_printk(const u64 *mask, const char *fmt, ...)
{
struct va_format vaf;
va_list args;
@@ -90,9 +89,10 @@ void __mlog_printk(const u64 *mask, const char *func, int line,
vaf.fmt = fmt;
vaf.va = &args;
- printk("%s(%s,%u,%u):%s:%d %s%pV",
+ printk("%s(%s,%u,%u):%pS %s%pV",
level, current->comm, task_pid_nr(current),
- raw_smp_processor_id(), func, line, prefix, &vaf);
+ raw_smp_processor_id(), __builtin_return_address(0),
+ prefix, &vaf);
va_end(args);
}
@@ -162,9 +162,8 @@ extern struct mlog_bits mlog_and_bits, mlog_not_bits;
#endif
-__printf(4, 5) __nocapture(2)
-void __mlog_printk(const u64 *m, const char *func, int line,
- const char *fmt, ...);
+__printf(2, 3) __nocapture(2)
+void __mlog_printk(const u64 *m, const char *fmt, ...);
/*
* Testing before the __mlog_printk call lets the compiler eliminate the
@@ -174,8 +173,7 @@ void __mlog_printk(const u64 *m, const char *func, int line,
do { \
u64 _m = MLOG_MASK_PREFIX | (mask); \
if (_m & ML_ALLOWED_BITS) \
- __mlog_printk(&_m, __func__, __LINE__, fmt, \
- ##__VA_ARGS__); \
+ __mlog_printk(&_m, fmt, ##__VA_ARGS__); \
} while (0)
#define mlog_errno(st) ({ \