aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2014-11-12 18:07:22 -0500
committerSteven Rostedt <rostedt@goodmis.org>2014-11-19 15:25:47 -0500
commitdba39448abb7340f86ae9b062f99d7acacb5d2d2 (patch)
tree8458bc1b3deda29028656637c84a5d0e10800578 /include/linux
parent183742f08c5532c0cd3c3d3fa184a26c092e2157 (diff)
tracing: Remove return values of most trace_seq_*() functions
The trace_seq_printf() and friends are used to store strings into a buffer that can be passed around from function to function. If the trace_seq buffer fills up, it will not print any more. The return values were somewhat inconsistant and using trace_seq_has_overflowed() was a better way to know if the write to the trace_seq buffer succeeded or not. Now that all users have removed reading the return value of the printf() type functions, they can safely return void and keep future users of them from reading the inconsistent values as well. Link: http://lkml.kernel.org/r/20141114011411.992510720@goodmis.org Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/trace_seq.h37
1 files changed, 15 insertions, 22 deletions
diff --git a/include/linux/trace_seq.h b/include/linux/trace_seq.h
index 07eda413dfcf..db8a73224f1a 100644
--- a/include/linux/trace_seq.h
+++ b/include/linux/trace_seq.h
@@ -57,40 +57,37 @@ static inline bool trace_seq_has_overflowed(struct trace_seq *s)
57 */ 57 */
58#ifdef CONFIG_TRACING 58#ifdef CONFIG_TRACING
59extern __printf(2, 3) 59extern __printf(2, 3)
60int trace_seq_printf(struct trace_seq *s, const char *fmt, ...); 60void trace_seq_printf(struct trace_seq *s, const char *fmt, ...);
61extern __printf(2, 0) 61extern __printf(2, 0)
62int trace_seq_vprintf(struct trace_seq *s, const char *fmt, va_list args); 62void trace_seq_vprintf(struct trace_seq *s, const char *fmt, va_list args);
63extern int 63extern void
64trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary); 64trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary);
65extern int trace_print_seq(struct seq_file *m, struct trace_seq *s); 65extern int trace_print_seq(struct seq_file *m, struct trace_seq *s);
66extern int trace_seq_to_user(struct trace_seq *s, char __user *ubuf, 66extern int trace_seq_to_user(struct trace_seq *s, char __user *ubuf,
67 int cnt); 67 int cnt);
68extern int trace_seq_puts(struct trace_seq *s, const char *str); 68extern void trace_seq_puts(struct trace_seq *s, const char *str);
69extern int trace_seq_putc(struct trace_seq *s, unsigned char c); 69extern void trace_seq_putc(struct trace_seq *s, unsigned char c);
70extern int trace_seq_putmem(struct trace_seq *s, const void *mem, unsigned int len); 70extern void trace_seq_putmem(struct trace_seq *s, const void *mem, unsigned int len);
71extern int trace_seq_putmem_hex(struct trace_seq *s, const void *mem, 71extern void trace_seq_putmem_hex(struct trace_seq *s, const void *mem,
72 unsigned int len); 72 unsigned int len);
73extern int trace_seq_path(struct trace_seq *s, const struct path *path); 73extern int trace_seq_path(struct trace_seq *s, const struct path *path);
74 74
75extern int trace_seq_bitmask(struct trace_seq *s, const unsigned long *maskp, 75extern void trace_seq_bitmask(struct trace_seq *s, const unsigned long *maskp,
76 int nmaskbits); 76 int nmaskbits);
77 77
78#else /* CONFIG_TRACING */ 78#else /* CONFIG_TRACING */
79static inline int trace_seq_printf(struct trace_seq *s, const char *fmt, ...) 79static inline void trace_seq_printf(struct trace_seq *s, const char *fmt, ...)
80{ 80{
81 return 0;
82} 81}
83static inline int 82static inline void
84trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary) 83trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary)
85{ 84{
86 return 0;
87} 85}
88 86
89static inline int 87static inline void
90trace_seq_bitmask(struct trace_seq *s, const unsigned long *maskp, 88trace_seq_bitmask(struct trace_seq *s, const unsigned long *maskp,
91 int nmaskbits) 89 int nmaskbits)
92{ 90{
93 return 0;
94} 91}
95 92
96static inline int trace_print_seq(struct seq_file *m, struct trace_seq *s) 93static inline int trace_print_seq(struct seq_file *m, struct trace_seq *s)
@@ -102,23 +99,19 @@ static inline int trace_seq_to_user(struct trace_seq *s, char __user *ubuf,
102{ 99{
103 return 0; 100 return 0;
104} 101}
105static inline int trace_seq_puts(struct trace_seq *s, const char *str) 102static inline void trace_seq_puts(struct trace_seq *s, const char *str)
106{ 103{
107 return 0;
108} 104}
109static inline int trace_seq_putc(struct trace_seq *s, unsigned char c) 105static inline void trace_seq_putc(struct trace_seq *s, unsigned char c)
110{ 106{
111 return 0;
112} 107}
113static inline int 108static inline void
114trace_seq_putmem(struct trace_seq *s, const void *mem, unsigned int len) 109trace_seq_putmem(struct trace_seq *s, const void *mem, unsigned int len)
115{ 110{
116 return 0;
117} 111}
118static inline int trace_seq_putmem_hex(struct trace_seq *s, const void *mem, 112static inline void trace_seq_putmem_hex(struct trace_seq *s, const void *mem,
119 unsigned int len) 113 unsigned int len)
120{ 114{
121 return 0;
122} 115}
123static inline int trace_seq_path(struct trace_seq *s, const struct path *path) 116static inline int trace_seq_path(struct trace_seq *s, const struct path *path)
124{ 117{