diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2014-06-23 16:42:07 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2014-07-01 07:13:37 -0400 |
commit | 9096032fbcdcdb80b76f1046346499e20417988e (patch) | |
tree | f4f0a3653f5c76c472c2ee6b6a03381b30223610 | |
parent | 6d2289f3faa71dcc5bba15c7aeba4f31c185b6df (diff) |
tracing: Remove trace_seq_reserve()
trace_seq_reserve() has no users in the kernel, it just wastes space.
Remove it.
Cc: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | include/linux/trace_seq.h | 5 | ||||
-rw-r--r-- | kernel/trace/trace_seq.c | 30 |
2 files changed, 0 insertions, 35 deletions
diff --git a/include/linux/trace_seq.h b/include/linux/trace_seq.h index 8283762ab7ef..dd85753e1bb0 100644 --- a/include/linux/trace_seq.h +++ b/include/linux/trace_seq.h | |||
@@ -43,7 +43,6 @@ extern int trace_seq_putc(struct trace_seq *s, unsigned char c); | |||
43 | extern int trace_seq_putmem(struct trace_seq *s, const void *mem, unsigned int len); | 43 | extern int trace_seq_putmem(struct trace_seq *s, const void *mem, unsigned int len); |
44 | extern int trace_seq_putmem_hex(struct trace_seq *s, const void *mem, | 44 | extern int trace_seq_putmem_hex(struct trace_seq *s, const void *mem, |
45 | unsigned int len); | 45 | unsigned int len); |
46 | extern void *trace_seq_reserve(struct trace_seq *s, unsigned int len); | ||
47 | extern int trace_seq_path(struct trace_seq *s, const struct path *path); | 46 | extern int trace_seq_path(struct trace_seq *s, const struct path *path); |
48 | 47 | ||
49 | extern int trace_seq_bitmask(struct trace_seq *s, const unsigned long *maskp, | 48 | extern int trace_seq_bitmask(struct trace_seq *s, const unsigned long *maskp, |
@@ -94,10 +93,6 @@ static inline int trace_seq_putmem_hex(struct trace_seq *s, const void *mem, | |||
94 | { | 93 | { |
95 | return 0; | 94 | return 0; |
96 | } | 95 | } |
97 | static inline void *trace_seq_reserve(struct trace_seq *s, unsigned int len) | ||
98 | { | ||
99 | return NULL; | ||
100 | } | ||
101 | static inline int trace_seq_path(struct trace_seq *s, const struct path *path) | 96 | static inline int trace_seq_path(struct trace_seq *s, const struct path *path) |
102 | { | 97 | { |
103 | return 0; | 98 | return 0; |
diff --git a/kernel/trace/trace_seq.c b/kernel/trace/trace_seq.c index 88c0f80f0a1f..1f24ed99dca2 100644 --- a/kernel/trace/trace_seq.c +++ b/kernel/trace/trace_seq.c | |||
@@ -342,36 +342,6 @@ int trace_seq_putmem_hex(struct trace_seq *s, const void *mem, | |||
342 | EXPORT_SYMBOL_GPL(trace_seq_putmem_hex); | 342 | EXPORT_SYMBOL_GPL(trace_seq_putmem_hex); |
343 | 343 | ||
344 | /** | 344 | /** |
345 | * trace_seq_reserve - reserve space on the sequence buffer | ||
346 | * @s: trace sequence descriptor | ||
347 | * @len: The amount to reserver. | ||
348 | * | ||
349 | * If for some reason there is a need to save some space on the | ||
350 | * buffer to fill in later, this function is used for that purpose. | ||
351 | * The given length will be reserved and the pointer to that | ||
352 | * location on the buffer is returned, unless there is not enough | ||
353 | * buffer left to hold the given length then NULL is returned. | ||
354 | */ | ||
355 | void *trace_seq_reserve(struct trace_seq *s, unsigned int len) | ||
356 | { | ||
357 | void *ret; | ||
358 | |||
359 | if (s->full) | ||
360 | return NULL; | ||
361 | |||
362 | if (len > TRACE_SEQ_BUF_LEFT(s)) { | ||
363 | s->full = 1; | ||
364 | return NULL; | ||
365 | } | ||
366 | |||
367 | ret = s->buffer + s->len; | ||
368 | s->len += len; | ||
369 | |||
370 | return ret; | ||
371 | } | ||
372 | EXPORT_SYMBOL_GPL(trace_seq_reserve); | ||
373 | |||
374 | /** | ||
375 | * trace_seq_path - copy a path into the sequence buffer | 345 | * trace_seq_path - copy a path into the sequence buffer |
376 | * @s: trace sequence descriptor | 346 | * @s: trace sequence descriptor |
377 | * @path: path to write into the sequence buffer. | 347 | * @path: path to write into the sequence buffer. |