LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Arnaldo Carvalho de Melo <acme@redhat.com>, Ingo Molnar <mingo@elte.hu>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org, 2nddept-manager@sdl.hitachi.co.jp,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Steven Rostedt <rostedt@goodmis.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH -perf/perf/core 1/4] tracing/kprobes: Cleanup strict_strtol() using code
Date: Fri, 04 Feb 2011 21:51:53 +0900 [thread overview]
Message-ID: <20110204125153.9507.49335.stgit@ltc236.sdl.hitachi.co.jp> (raw)
In-Reply-To: <20110204125145.9507.5169.stgit@ltc236.sdl.hitachi.co.jp>
Since strict_strtol() accepts minus digits started with '-',
it doesn' need to invert after converting.
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: linux-kernel@vger.kernel.org
---
kernel/trace/trace_kprobe.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index 2dec9bc..2088893 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -767,16 +767,15 @@ static int __parse_probe_arg(char *arg, const struct fetch_type *t,
}
break;
case '+': /* deref memory */
+ arg++; /* Skip '+', because strict_strtol() rejects it. */
case '-':
tmp = strchr(arg, '(');
if (!tmp)
break;
*tmp = '\0';
- ret = strict_strtol(arg + 1, 0, &offset);
+ ret = strict_strtol(arg, 0, &offset);
if (ret)
break;
- if (arg[0] == '-')
- offset = -offset;
arg = tmp + 1;
tmp = strrchr(arg, ')');
if (tmp) {
next prev parent reply other threads:[~2011-02-04 12:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-04 12:51 [PATCH -perf/perf/core 0/4] Perf probe/kprobe-tracer update (support bitfield, etc) Masami Hiramatsu
2011-02-04 12:51 ` Masami Hiramatsu [this message]
2011-02-08 15:16 ` [tip:perf/core] tracing/kprobes: Cleanup strict_strtol() using code tip-bot for Masami Hiramatsu
2011-02-04 12:51 ` [PATCH -perf/perf/core 2/4] tracing/kprobes: support longer(>128) command Masami Hiramatsu
2011-02-08 15:17 ` [tip:perf/core] tracing/kprobes: Support longer (>128 bytes) command tip-bot for Masami Hiramatsu
2011-02-04 12:52 ` [PATCH -perf/perf/core 3/4] tracing/kprobes: Add bitfield type Masami Hiramatsu
2011-02-08 15:17 ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2011-02-04 12:52 ` [PATCH -perf/perf/core 4/4] perf/probe: Add bitfield member support Masami Hiramatsu
2011-02-08 15:18 ` [tip:perf/core] perf probe: " tip-bot for Masami Hiramatsu
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=20110204125153.9507.49335.stgit@ltc236.sdl.hitachi.co.jp \
--to=masami.hiramatsu.pt@hitachi.com \
--cc=2nddept-manager@sdl.hitachi.co.jp \
--cc=acme@redhat.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=srikar@linux.vnet.ibm.com \
--subject='Re: [PATCH -perf/perf/core 1/4] tracing/kprobes: Cleanup strict_strtol() using code' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).