Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1577371
| From | Mars Cheng <mars.cheng@mediatek.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] perf/core: remove useless cast when comparing |
| Date | 2017-02-09 09:40 +0100 |
| Message-ID | <t8SqJ-3R5-9@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] perf/core: remove useless cast when comparing Mars Cheng <mars.cheng@mediatek.com> - 2017-02-09 09:40 +0100 Re: [PATCH] perf/core: remove useless cast when comparing Peter Zijlstra <peterz@infradead.org> - 2017-02-09 11:20 +0100
csiph-web