From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: He Kuang <hekuang@huawei.com>
Cc: acme@kernel.org, mingo@redhat.com, wangnan0@huawei.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf: Fix a precedence bug
Date: Fri, 27 Feb 2015 19:40:59 +0900 [thread overview]
Message-ID: <54F049BB.1000506@hitachi.com> (raw)
In-Reply-To: <1425029729-5069-1-git-send-email-hekuang@huawei.com>
Hi,
(2015/02/27 18:35), He Kuang wrote:
> The minus operator has higher precedence than ?:
> Add parentheses around ?: fix this.
Thank you for fixing that,
Could you give us an actual example of the result?
e.g. What happened? and how to reproduce it?
Thank you,
> ---
> tools/perf/util/probe-event.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
> index 919937e..bed8d0f 100644
> --- a/tools/perf/util/probe-event.c
> +++ b/tools/perf/util/probe-event.c
> @@ -150,7 +150,7 @@ static u64 kernel_get_symbol_address_by_name(const char *name, bool reloc)
> sym = __find_kernel_function_by_name(name, &map);
> if (sym)
> return map->unmap_ip(map, sym->start) -
> - (reloc) ? 0 : map->reloc;
> + ((reloc) ? 0 : map->reloc);
> }
> return 0;
> }
>
--
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Research Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com
next prev parent reply other threads:[~2015-02-27 10:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-27 9:35 [PATCH] perf: Fix a precedence bug He Kuang
2015-02-27 10:38 ` He Kuang
2015-02-27 10:40 ` Masami Hiramatsu [this message]
2015-02-27 10:52 ` He Kuang
2015-02-27 11:12 ` Masami Hiramatsu
2015-02-27 11:17 ` Masami Hiramatsu
2015-02-28 9:32 ` [tip:perf/core] perf probe: " tip-bot for He Kuang
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=54F049BB.1000506@hitachi.com \
--to=masami.hiramatsu.pt@hitachi.com \
--cc=acme@kernel.org \
--cc=hekuang@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=wangnan0@huawei.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.