From: Gilad Ben-Yossef <gilad@benyossef.com>
To: linux-kernel@vger.kernel.org
Cc: Gilad Ben-Yossef <gilad@benyossef.com>,
Michal Nazarewicz <mina86@mina86.com>,
Tony Luck <tony.luck@intel.com>,
Fenghua Yu <fenghua.yu@intel.com>,
linux-ia64@vger.kernel.org
Subject: [RFC PATCH 2/9] ia64: avoid using on_each_cpu hard coded ret value
Date: Tue, 3 Jan 2012 16:19:06 +0200 [thread overview]
Message-ID: <1325600353-10895-3-git-send-email-gilad@benyossef.com> (raw)
In-Reply-To: <1325600353-10895-1-git-send-email-gilad@benyossef.com>
on_each_cpu always returns a hard coded return code of zero.
Removing all tests based on this return value saves run time
cycles for compares and code bloat for branches.
Cc: Michal Nazarewicz <mina86@mina86.com>
CC: Tony Luck <tony.luck@intel.com>
CC: Fenghua Yu <fenghua.yu@intel.com>
CC: linux-ia64@vger.kernel.org
---
arch/ia64/kernel/perfmon.c | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index 89accc6..eb7cfa5 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -6511,11 +6511,7 @@ pfm_install_alt_pmu_interrupt(pfm_intr_handler_desc_t *hdl)
}
/* save the current system wide pmu states */
- ret = on_each_cpu(pfm_alt_save_pmu_state, NULL, 1);
- if (ret) {
- DPRINT(("on_each_cpu() failed: %d\n", ret));
- goto cleanup_reserve;
- }
+ on_each_cpu(pfm_alt_save_pmu_state, NULL, 1);
/* officially change to the alternate interrupt handler */
pfm_alt_intr_handler = hdl;
@@ -6542,7 +6538,6 @@ int
pfm_remove_alt_pmu_interrupt(pfm_intr_handler_desc_t *hdl)
{
int i;
- int ret;
if (hdl == NULL) return -EINVAL;
@@ -6556,10 +6551,7 @@ pfm_remove_alt_pmu_interrupt(pfm_intr_handler_desc_t *hdl)
pfm_alt_intr_handler = NULL;
- ret = on_each_cpu(pfm_alt_restore_pmu_state, NULL, 1);
- if (ret) {
- DPRINT(("on_each_cpu() failed: %d\n", ret));
- }
+ on_each_cpu(pfm_alt_restore_pmu_state, NULL, 1);
for_each_online_cpu(i) {
pfm_unreserve_session(NULL, 1, i);
--
1.7.0.4
next prev parent reply other threads:[~2012-01-03 14:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-03 14:19 [RFC PATCH 0/9] Remove useless on_each_cpu return value Gilad Ben-Yossef
2012-01-03 14:19 ` [RFC PATCH 1/9] arm: avoid using on_each_cpu hard coded ret value Gilad Ben-Yossef
2012-01-09 8:28 ` Uwe Kleine-König
2012-01-03 14:19 ` Gilad Ben-Yossef [this message]
2012-01-03 14:19 ` [RFC PATCH 3/9] x86: " Gilad Ben-Yossef
2012-01-03 14:19 ` [RFC PATCH 4/9] alpha: " Gilad Ben-Yossef
2012-01-03 14:19 ` [RFC PATCH 5/9] ppc: " Gilad Ben-Yossef
2012-01-03 14:19 ` [RFC PATCH 6/9] agp: " Gilad Ben-Yossef
2012-01-03 14:19 ` [RFC PATCH 7/9] drm: " Gilad Ben-Yossef
2012-01-03 14:19 ` [RFC PATCH 8/9] smp: refactor on_each_cpu to void returning func Gilad Ben-Yossef
2012-01-03 14:19 ` [RFC PATCH 9/9] x86: refactor wbinvd_on_all_cpus to void function Gilad Ben-Yossef
2012-01-03 14:25 ` [RFC PATCH 0/9] Remove useless on_each_cpu return value Michal Nazarewicz
2012-01-03 16:08 ` Gilad Ben-Yossef
2012-01-06 13:03 ` Peter Zijlstra
2012-01-08 16:10 ` Gilad Ben-Yossef
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=1325600353-10895-3-git-send-email-gilad@benyossef.com \
--to=gilad@benyossef.com \
--cc=fenghua.yu@intel.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mina86@mina86.com \
--cc=tony.luck@intel.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
all inboxes | Powered by JetHome®