Skip to contentSkip to conversation

trace/ftrace.c: Fix compile warnings

PATCH Javier Martinez Canillas 1 participant 1 message Oct 31, 2009

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

This patch is against linux-next 20091030.

It solves two compile warning on kernel/trace/ftrace.c.

---
 kernel/trace/ftrace.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
kernel/trace/ftrace.c +6 -3
index 1ed514f..7f3756d 100644
@@ -2274,7 +2274,9 @@ 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;
+#ifdef CONFIG_FUNCTION_GRAPH_TRACER
 static char ftrace_graph_buf[FTRACE_FILTER_SIZE] __initdata;
+#endif
 
 static int __init set_ftrace_notrace(char *str)
 {
@@ -2987,6 +2989,7 @@ ftrace_pid_write(struct file *filp, const char __user *ubuf,
 {
 	char buf[64];
 	long val;
+	char *bufstr;
 	int ret;
 
 	if (cnt >= sizeof(buf))
@@ -3001,11 +3004,11 @@ ftrace_pid_write(struct file *filp, const char __user *ubuf,
 	 * Allow "echo > set_ftrace_pid" or "echo -n '' > set_ftrace_pid"
 	 * to clean the filter quietly.
 	 */
-	strstrip(buf);
-	if (strlen(buf) = 0)
+	bufstr = strstrip(buf);
+	if (strlen(bufstr) = 0)
 		return 1;
 
-	ret = strict_strtol(buf, 10, &val);
+	ret = strict_strtol(bufstr, 10, &val);
 	if (ret < 0)
 		return ret;
 
Signature · 1 line
1.6.0.4