aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Rix <trix@redhat.com>2020-12-21 08:27:15 -0800
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2021-02-02 17:02:05 -0500
commitbd0c9706430240e3b7e9323361bb25066540d2a8 (patch)
tree5d763c3c8fd71a9630b4e86df57653f432a36611
parenttracepoint: Fix race between tracing and removing tracepoint (diff)
downloadlinux-dev-bd0c9706430240e3b7e9323361bb25066540d2a8.tar.xz
linux-dev-bd0c9706430240e3b7e9323361bb25066540d2a8.zip
tracing: Add printf attribute to log function
Attributing the function allows the compiler to more thoroughly check the use of the function with -Wformat and similar flags. Link: https://lkml.kernel.org/r/20201221162715.3757291-1-trix@redhat.com Signed-off-by: Tom Rix <trix@redhat.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rw-r--r--include/linux/trace.h3
1 files changed, 2 insertions, 1 deletions
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);