Messages in this thread Patch in this message | | | From | Mars Cheng <> | Subject | [PATCH] perf/core: remove useless cast when comparing | Date | Thu, 9 Feb 2017 16:25:46 +0800 |
| |
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
| |