lkml.org 
[lkml]   [2017]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] perf/core: remove useless cast when comparing
Date
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
\
 
 \ /
  Last update: 2017-02-09 09:32    [W:0.065 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site