From: hawkes@sgi.com
To: Tony Luck <tony.luck@gmail.com>, Andrew Morton <akpm@osdl.org>,
linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Jack Steiner <steiner@sgi.com>,
hawkes@sgi.com, Jes Sorensen <jes@sgi.com>
Subject: [PATCH] ia64 sn_hwperf use of num_online_cpus()
Date: Mon, 27 Mar 2006 21:18:17 +0000 [thread overview]
Message-ID: <20060327211817.16768.77971.sendpatchset@tomahawk.engr.sgi.com> (raw)
Eliminate an unnecessary -- and flawed -- use of the expensive
num_online_cpus().
Signed-off-by: John Hawkes <hawkes@sgi.com>
Index: linux/arch/ia64/sn/kernel/sn2/sn_hwperf.c
=================================--- linux.orig/arch/ia64/sn/kernel/sn2/sn_hwperf.c 2006-03-19 21:53:29.000000000 -0800
+++ linux/arch/ia64/sn/kernel/sn2/sn_hwperf.c 2006-03-27 13:14:12.000000000 -0800
@@ -605,7 +605,7 @@ static int sn_hwperf_op_cpu(struct sn_hw
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;
}
reply other threads:[~2006-03-27 21:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060327211817.16768.77971.sendpatchset@tomahawk.engr.sgi.com \
--to=hawkes@sgi.com \
--cc=akpm@osdl.org \
--cc=jes@sgi.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=steiner@sgi.com \
--cc=tony.luck@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox