LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: tip-bot for Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org, hpa@zytor.com,
	mingo@redhat.com, masami.hiramatsu.pt@hitachi.com,
	fweisbec@gmail.com, rostedt@goodmis.org,
	srikar@linux.vnet.ibm.com, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perf/core] tracing/kprobes: Cleanup strict_strtol() using code
Date: Tue, 8 Feb 2011 15:16:54 GMT	[thread overview]
Message-ID: <tip-76022db323dd6d7c6958df3d595f7dedf7a14778@git.kernel.org> (raw)
In-Reply-To: <20110204125153.9507.49335.stgit@ltc236.sdl.hitachi.co.jp>

Commit-ID:  76022db323dd6d7c6958df3d595f7dedf7a14778
Gitweb:     http://git.kernel.org/tip/76022db323dd6d7c6958df3d595f7dedf7a14778
Author:     Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
AuthorDate: Fri, 4 Feb 2011 21:51:53 +0900
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 7 Feb 2011 09:13:36 -0200

tracing/kprobes: Cleanup strict_strtol() using code

Since strict_strtol() accepts minus digits started with '-', it doesn't
need to invert after converting.

Cc: 2nddept-manager@sdl.hitachi.co.jp
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <20110204125153.9507.49335.stgit@ltc236.sdl.hitachi.co.jp>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 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) {

  reply	other threads:[~2011-02-08 15:17 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 ` [PATCH -perf/perf/core 1/4] tracing/kprobes: Cleanup strict_strtol() using code Masami Hiramatsu
2011-02-08 15:16   ` tip-bot for Masami Hiramatsu [this message]
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=tip-76022db323dd6d7c6958df3d595f7dedf7a14778@git.kernel.org \
    --to=masami.hiramatsu.pt@hitachi.com \
    --cc=acme@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=srikar@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).