* trace/ftrace.c: Fix compile warnings
@ 2009-10-31 5:06 Javier Martinez Canillas
0 siblings, 0 replies; 2+ messages in thread
From: Javier Martinez Canillas @ 2009-10-31 5:06 UTC (permalink / raw)
To: kernel-janitors
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: trace/ftrace.c: Fix compile warnings
@ 2009-11-18 2:37 Steven Rostedt
0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2009-11-18 2:37 UTC (permalink / raw)
To: kernel-janitors
Hi,
I just noticed this buried in my Inbox. The first change has already
been fixed. But your second change is indeed a bug.
Thanks!
Note, please add "[PATCH]" in your subject. Those get filtered to an
"urgent" folder, and is more likely to be spotted by others.
-- Steve
On Sat, 2009-10-31 at 02:06 -0300, Javier Martinez Canillas wrote:
> 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;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-11-18 2:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-31 5:06 trace/ftrace.c: Fix compile warnings Javier Martinez Canillas
-- strict thread matches above, loose matches on Subject: below --
2009-11-18 2:37 Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox