* [PATCH] tracing: add printf attribute to log function
@ 2020-12-21 16:27 trix
0 siblings, 0 replies; only message in thread
From: trix @ 2020-12-21 16:27 UTC (permalink / raw)
To: rostedt, mingo; +Cc: linux-kernel, Tom Rix
From: Tom Rix <trix@redhat.com>
Attributing the function allows the compiler to more thoroughly
check the use of the function with -Wformat and similar flags.
Signed-off-by: Tom Rix <trix@redhat.com>
---
include/linux/trace.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/trace.h b/include/linux/trace.h
index 886a4ffd9d45..be1e130ed87c 100644
--- a/include/linux/trace.h
+++ b/include/linux/trace.h
@@ -34,8 +34,9 @@ int unregister_ftrace_export(struct trace_export *export);
struct trace_array;
void trace_printk_init_buffers(void);
+__printf(3, 4)
int trace_array_printk(struct trace_array *tr, unsigned long ip,
- const char *fmt, ...);
+ const char *fmt, ...);
int trace_array_init_printk(struct trace_array *tr);
void trace_array_put(struct trace_array *tr);
struct trace_array *trace_array_get_by_name(const char *name);
--
2.27.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-21 16:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-21 16:27 [PATCH] tracing: add printf attribute to log function trix
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome