Skip to content

Commit

Permalink
[IA64-SGI] sn_hwperf use of num_online_cpus()
Browse files Browse the repository at this point in the history
Eliminate an unnecessary -- and flawed -- use of the expensive
num_online_cpus().

Signed-off-by: John Hawkes <hawkes@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
  • Loading branch information
hawkes@sgi.com authored and Tony Luck committed Mar 27, 2006
1 parent ce9eed5 commit e6ef0fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/ia64/sn/kernel/sn2/sn_hwperf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e6ef0fc

Please sign in to comment.