From: Javier Martinez Canillas <martinez.javier@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: trace/ftrace.c: Fix compile warnings
Date: Sat, 31 Oct 2009 05:06:03 +0000 [thread overview]
Message-ID: <1256965563.4278.7.camel@laptop> (raw)
This patch is against linux-next 20091030.
It solves two compile warning on kernel/trace/ftrace.c.
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
---
kernel/trace/ftrace.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 1ed514f..7f3756d 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -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;
--
1.6.0.4
next reply other threads:[~2009-10-31 5:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-31 5:06 Javier Martinez Canillas [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-11-18 2:37 trace/ftrace.c: Fix compile warnings Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1256965563.4278.7.camel@laptop \
--to=martinez.javier@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox