提交 19220999 编写于 作者: H Heiko Carstens 提交者: Martin Schwidefsky

s390/cpumf: remove superfluous nr_cpumask_bits check

Paul Burton reported that the nr_cpumask_bits check
within cpumsf_pmu_event_init() is not necessary.

Actually there is already a prior check within
perf_event_alloc(). Therefore remove the check.
Reported-by: NPaul Burton <paul.burton@imgtec.com>
Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 76b31381
......@@ -823,12 +823,8 @@ static int cpumsf_pmu_event_init(struct perf_event *event)
}
/* Check online status of the CPU to which the event is pinned */
if (event->cpu >= 0) {
if ((unsigned int)event->cpu >= nr_cpumask_bits)
if (event->cpu >= 0 && !cpu_online(event->cpu))
return -ENODEV;
if (!cpu_online(event->cpu))
return -ENODEV;
}
/* Force reset of idle/hv excludes regardless of what the
* user requested.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册