summaryrefslogtreecommitdiffstats
path: root/kernel/trace/seq_buf.c
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat)2014-11-04 00:53:50 +0100
committerSteven Rostedt2014-11-20 04:01:19 +0100
commit2448913ed2aa7a7424d9b9ca79861d13c746a3f1 (patch)
tree67d031584d72a54240e0497f6f37ef44ffcbff20 /kernel/trace/seq_buf.c
parenttracing: Add seq_buf_get_buf() and seq_buf_commit() helper functions (diff)
downloadkernel-qcow2-linux-2448913ed2aa7a7424d9b9ca79861d13c746a3f1.tar.gz
kernel-qcow2-linux-2448913ed2aa7a7424d9b9ca79861d13c746a3f1.tar.xz
kernel-qcow2-linux-2448913ed2aa7a7424d9b9ca79861d13c746a3f1.zip
seq-buf: Make seq_buf_bprintf() conditional on CONFIG_BINARY_PRINTF
The function bstr_printf() from lib/vsprnintf.c is only available if CONFIG_BINARY_PRINTF is defined. This is due to the only user currently being the tracing infrastructure, which needs to select this config when tracing is configured. Until there is another user of the binary printf formats, this will continue to be the case. Since seq_buf.c is now lives in lib/ and is compiled even without tracing, it must encompass its use of bstr_printf() which is used by seq_buf_printf(). This too is only used by the tracing infrastructure and is still encapsulated by the CONFIG_BINARY_PRINTF. Link: http://lkml.kernel.org/r/20141104160222.969013383@goodmis.org Tested-by: Jiri Kosina <jkosina@suse.cz> Acked-by: Jiri Kosina <jkosina@suse.cz> Reviewed-by: Petr Mladek <pmladek@suse.cz> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/seq_buf.c')
-rw-r--r--kernel/trace/seq_buf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/trace/seq_buf.c b/kernel/trace/seq_buf.c
index 086f594ac890..4eedfedb9e31 100644
--- a/kernel/trace/seq_buf.c
+++ b/kernel/trace/seq_buf.c
@@ -127,6 +127,7 @@ int seq_buf_bitmask(struct seq_buf *s, const unsigned long *maskp,
return -1;
}
+#ifdef CONFIG_BINARY_PRINTF
/**
* seq_buf_bprintf - Write the printf string from binary arguments
* @s: seq_buf descriptor
@@ -161,6 +162,7 @@ int seq_buf_bprintf(struct seq_buf *s, const char *fmt, const u32 *binary)
seq_buf_set_overflow(s);
return -1;
}
+#endif /* CONFIG_BINARY_PRINTF */
/**
* seq_buf_puts - sequence printing of simple string