Skip to contentSkip to conversation

tracing: prevent build warning: 'ftrace_graph_buf' defined but not used

PATCH In review Lai Jiangshan 3 participants 6 messages Nov 5, 2009 – Nov 18, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tracing: prevent build warning: 'ftrace_graph_buf' defined but not used

prevent build warning when !CONFIG_FUNCTION_GRAPH_TRACER

---

kernel/trace/ftrace.c +1 -1
index 7cb6f19..892e3ea 100644
@@ -2274,7 +2274,6 @@ void ftrace_set_notrace(unsigned char *buf, int len, int reset)
 #define FTRACE_FILTER_SIZE		COMMAND_LINE_SIZE
 static char ftrace_notrace_buf[FTRACE_FILTER_SIZE] __initdata;
 static char ftrace_filter_buf[FTRACE_FILTER_SIZE] __initdata;
-static char ftrace_graph_buf[FTRACE_FILTER_SIZE] __initdata;
 
 static int __init set_ftrace_notrace(char *str)
 {
@@ -2291,6 +2290,7 @@ static int __init set_ftrace_filter(char *str)
 __setup("ftrace_filter=", set_ftrace_filter);
 
 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
+static char ftrace_graph_buf[FTRACE_FILTER_SIZE] __initdata;
 static int __init set_graph_function(char *str)
 {
 	strlcpy(ftrace_graph_buf, str, FTRACE_FILTER_SIZE);
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Lai Jiangshan

prevent build warning when !CONFIG_FUNCTION_GRAPH_TRACER

Quoted 22 lines

---

kernel/trace/ftrace.c +1 -1
index 7cb6f19..892e3ea 100644
@@ -2274,7 +2274,6 @@ void ftrace_set_notrace(unsigned char *buf, int len, int reset)
 #define FTRACE_FILTER_SIZE		COMMAND_LINE_SIZE
 static char ftrace_notrace_buf[FTRACE_FILTER_SIZE] __initdata;
 static char ftrace_filter_buf[FTRACE_FILTER_SIZE] __initdata;
-static char ftrace_graph_buf[FTRACE_FILTER_SIZE] __initdata;
 
 static int __init set_ftrace_notrace(char *str)
 {
@@ -2291,6 +2290,7 @@ static int __init set_ftrace_filter(char *str)
 __setup("ftrace_filter=", set_ftrace_filter);
 
 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
+static char ftrace_graph_buf[FTRACE_FILTER_SIZE] __initdata;
 static int __init set_graph_function(char *str)
 {
 	strlcpy(ftrace_graph_buf, str, FTRACE_FILTER_SIZE);
#2 lore raw
Quoted 7 lines · Frederic Weisbecker
Quoted 3 lines · Lai Jiangshan

prevent build warning when !CONFIG_FUNCTION_GRAPH_TRACER

Hi, Ingo,

Could you apply this cleanup patch for -tip?

Lai

Quoted 28 lines
Quoted 25 lines

---

kernel/trace/ftrace.c +1 -1
index 7cb6f19..892e3ea 100644
@@ -2274,7 +2274,6 @@ void ftrace_set_notrace(unsigned char *buf, int len, int reset)
 #define FTRACE_FILTER_SIZE		COMMAND_LINE_SIZE
 static char ftrace_notrace_buf[FTRACE_FILTER_SIZE] __initdata;
 static char ftrace_filter_buf[FTRACE_FILTER_SIZE] __initdata;
-static char ftrace_graph_buf[FTRACE_FILTER_SIZE] __initdata;
 
 static int __init set_ftrace_notrace(char *str)
 {
@@ -2291,6 +2290,7 @@ static int __init set_ftrace_filter(char *str)
 __setup("ftrace_filter=", set_ftrace_filter);
 
 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
+static char ftrace_graph_buf[FTRACE_FILTER_SIZE] __initdata;
 static int __init set_graph_function(char *str)
 {
 	strlcpy(ftrace_graph_buf, str, FTRACE_FILTER_SIZE);
maintainer
#4 lore raw
In reply to Lai Jiangshan
Quoted 4 lines · Lai Jiangshan
Quoted 3 lines · Frederic Weisbecker
Quoted 2 lines · Lai Jiangshan

prevent build warning when !CONFIG_FUNCTION_GRAPH_TRACER

Quoted 9 lines
Quoted 4 lines
Quoted 1 line

Hi, Ingo,

Could you apply this cleanup patch for -tip?

Ah this is only in tip. OK, I'll add it to my queue anyway.

-- Steve

#5 lore raw

[tip:tracing/core] tracing: Prevent build warning: 'ftrace_graph_buf' defined but not used

In reply to Lai Jiangshan
Commit-ID:  f6060f46819f313d34a8c8151390cda509c23389
Gitweb:     http://git.kernel.org/tip/f6060f46819f313d34a8c8151390cda509c23389
Author:     Lai Jiangshan <[email protected]>
AuthorDate: Thu, 5 Nov 2009 11:16:17 +0800
Committer:  Steven Rostedt <[email protected]>
CommitDate: Tue, 17 Nov 2009 11:05:49 -0500

tracing: Prevent build warning: 'ftrace_graph_buf' defined but not used

Prevent build warning when CONFIG_FUNCTION_GRAPH_TRACER is not set.

LKML-Reference: <[email protected]>

---
 kernel/trace/ftrace.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/trace/ftrace.c +1 -1
index 1ed514f..7f9b51e 100644
@@ -2274,7 +2274,6 @@ void ftrace_set_notrace(unsigned char *buf, int len, int reset)
 #define FTRACE_FILTER_SIZE		COMMAND_LINE_SIZE
 static char ftrace_notrace_buf[FTRACE_FILTER_SIZE] __initdata;
 static char ftrace_filter_buf[FTRACE_FILTER_SIZE] __initdata;
-static char ftrace_graph_buf[FTRACE_FILTER_SIZE] __initdata;
 
 static int __init set_ftrace_notrace(char *str)
 {
@@ -2291,6 +2290,7 @@ static int __init set_ftrace_filter(char *str)
 __setup("ftrace_filter=", set_ftrace_filter);
 
 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
+static char ftrace_graph_buf[FTRACE_FILTER_SIZE] __initdata;
 static int __init set_graph_function(char *str)
 {
 	strlcpy(ftrace_graph_buf, str, FTRACE_FILTER_SIZE);