Sfoglia il codice sorgente

tracing: Make tracer_tracing_is_on() return bool

There's code that expects tracer_tracing_is_on() to be either true or false,
not some random number. Currently, it should only return one or zero, but
just in case, change its return value to bool, to enforce it.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Steven Rostedt (VMware) 7 anni fa
parent
commit
ec57350883
2 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 1 1
      kernel/trace/trace.c
  2. 1 1
      kernel/trace/trace.h

+ 1 - 1
kernel/trace/trace.c

@@ -1087,7 +1087,7 @@ void disable_trace_on_warning(void)
  *
  *
  * Shows real state of the ring buffer if it is enabled or not.
  * Shows real state of the ring buffer if it is enabled or not.
  */
  */
-int tracer_tracing_is_on(struct trace_array *tr)
+bool tracer_tracing_is_on(struct trace_array *tr)
 {
 {
 	if (tr->trace_buffer.buffer)
 	if (tr->trace_buffer.buffer)
 		return ring_buffer_record_is_on(tr->trace_buffer.buffer);
 		return ring_buffer_record_is_on(tr->trace_buffer.buffer);

+ 1 - 1
kernel/trace/trace.h

@@ -594,7 +594,7 @@ void tracing_reset_current(int cpu);
 void tracing_reset_all_online_cpus(void);
 void tracing_reset_all_online_cpus(void);
 int tracing_open_generic(struct inode *inode, struct file *filp);
 int tracing_open_generic(struct inode *inode, struct file *filp);
 bool tracing_is_disabled(void);
 bool tracing_is_disabled(void);
-int tracer_tracing_is_on(struct trace_array *tr);
+bool tracer_tracing_is_on(struct trace_array *tr);
 void tracer_tracing_on(struct trace_array *tr);
 void tracer_tracing_on(struct trace_array *tr);
 void tracer_tracing_off(struct trace_array *tr);
 void tracer_tracing_off(struct trace_array *tr);
 struct dentry *trace_create_file(const char *name,
 struct dentry *trace_create_file(const char *name,