projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c8b186a
)
tracing: Add printf attribute to log function
author
Tom Rix
<trix@redhat.com>
Mon, 21 Dec 2020 16:27:15 +0000
(08:27 -0800)
committer
Steven Rostedt (VMware)
<rostedt@goodmis.org>
Tue, 2 Feb 2021 22:02:05 +0000
(17:02 -0500)
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>
include/linux/trace.h
patch
|
blob
|
history
diff --git
a/include/linux/trace.h
b/include/linux/trace.h
index 886a4ffd9d45de42bebac10909608f8865855151..be1e130ed87c16ae153e4f8b2ff7837bb861099d 100644
(file)
--- 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);