Skip to content

Commit ec57350

Browse files
committed
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>
1 parent 978defe commit ec57350

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎kernel/trace/trace.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,7 @@ void disable_trace_on_warning(void)
10871087
*
10881088
* Shows real state of the ring buffer if it is enabled or not.
10891089
*/
1090-
int tracer_tracing_is_on(struct trace_array *tr)
1090+
bool tracer_tracing_is_on(struct trace_array *tr)
10911091
{
10921092
if (tr->trace_buffer.buffer)
10931093
return ring_buffer_record_is_on(tr->trace_buffer.buffer);

‎kernel/trace/trace.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ void tracing_reset_current(int cpu);
594594
void tracing_reset_all_online_cpus(void);
595595
int tracing_open_generic(struct inode *inode, struct file *filp);
596596
bool tracing_is_disabled(void);
597-
int tracer_tracing_is_on(struct trace_array *tr);
597+
bool tracer_tracing_is_on(struct trace_array *tr);
598598
void tracer_tracing_on(struct trace_array *tr);
599599
void tracer_tracing_off(struct trace_array *tr);
600600
struct dentry *trace_create_file(const char *name,

0 commit comments

Comments
 (0)