When the set_graph_function or set_graph_notrace contains no records, a
banner is displayed of either "#### all functions enabled ####" or
"#### all functions disabled ####" respectively. To tell the seq operations
to do this, (void *)1 is passed as a return value. Instead of using a
hardcoded meaningless variable, define it as a macro.
Acked-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
GRAPH_FILTER_FUNCTION,
};
+#define FTRACE_GRAPH_EMPTY ((void *)1)
+
struct ftrace_graph_data {
struct ftrace_hash *hash;
struct ftrace_func_entry *entry;
/* Nothing, tell g_show to print all functions are enabled */
if (ftrace_hash_empty(fgd->hash) && !*pos)
- return (void *)1;
+ return FTRACE_GRAPH_EMPTY;
fgd->idx = 0;
fgd->entry = NULL;
if (!entry)
return 0;
- if (entry == (void *)1) {
+ if (entry == FTRACE_GRAPH_EMPTY) {
struct ftrace_graph_data *fgd = m->private;
if (fgd->type == GRAPH_FILTER_FUNCTION)