Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6ef0fca authored by hawkes@sgi.com's avatar hawkes@sgi.com Committed by Tony Luck
Browse files

[IA64-SGI] sn_hwperf use of num_online_cpus()



Eliminate an unnecessary -- and flawed -- use of the expensive
num_online_cpus().

Signed-off-by: default avatarJohn Hawkes <hawkes@sgi.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent ce9eed5a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -605,7 +605,7 @@ static int sn_hwperf_op_cpu(struct sn_hwperf_op_info *op_info)
	op_info->a->arg &= SN_HWPERF_ARG_OBJID_MASK;

	if (cpu != SN_HWPERF_ARG_ANY_CPU) {
		if (cpu >= num_online_cpus() || !cpu_online(cpu)) {
		if (cpu >= NR_CPUS || !cpu_online(cpu)) {
			r = -EINVAL;
			goto out;
		}