From: Mars Cheng <mars.cheng@mediatek.com>
To: Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>
Cc: CC Hwang <cc.hwang@mediatek.com>,
Loda Chou <loda.chou@mediatek.com>,
Miles Chen <miles.chen@mediatek.com>,
Jades Shih <jades.shih@mediatek.com>,
Yingjoe Chen <yingjoe.chen@mediatek.com>,
My Chuang <my.chuang@mediatek.com>,
<linux-kernel@vger.kernel.org>, <wsd_upstream@mediatek.com>,
Mars Cheng <mars.cheng@mediatek.com>
Subject: [PATCH] perf/core: remove useless cast when comparing
Date: Thu, 9 Feb 2017 16:25:46 +0800 [thread overview]
Message-ID: <1486628746-23538-1-git-send-email-mars.cheng@mediatek.com> (raw)
since nr_cpu_ids and cpu are both int, remove the casting
Signed-off-by: Mars Cheng <mars.cheng@mediatek.com>
---
kernel/events/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index ab15509..3482342 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -9085,7 +9085,7 @@ static void account_event(struct perf_event *event)
struct hw_perf_event *hwc;
long err = -EINVAL;
- if ((unsigned)cpu >= nr_cpu_ids) {
+ if (cpu >= nr_cpu_ids) {
if (!task || cpu != -1)
return ERR_PTR(-EINVAL);
}
--
1.7.9.5
next reply other threads:[~2017-02-09 8:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-09 8:25 Mars Cheng [this message]
2017-02-09 10:11 ` Peter Zijlstra
2017-02-13 2:38 ` [lkp-robot] [perf/core] bc2a73c243: WARNING:at_include/linux/cpumask.h:#find_get_context kernel test robot
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=1486628746-23538-1-git-send-email-mars.cheng@mediatek.com \
--to=mars.cheng@mediatek.com \
--cc=cc.hwang@mediatek.com \
--cc=jades.shih@mediatek.com \
--cc=linux-kernel@vger.kernel.org \
--cc=loda.chou@mediatek.com \
--cc=miles.chen@mediatek.com \
--cc=mingo@redhat.com \
--cc=my.chuang@mediatek.com \
--cc=peterz@infradead.org \
--cc=wsd_upstream@mediatek.com \
--cc=yingjoe.chen@mediatek.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®