LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] perf/x86/amd/ibs: Convert force_ibs_eilvt_setup to void
@ 2015-01-23 18:19 Aravind Gopalakrishnan
  2015-02-18 17:13 ` [tip:perf/core] perf/x86/amd/ibs: Convert force_ibs_eilvt_setup() " tip-bot for Aravind Gopalakrishnan
  0 siblings, 1 reply; 2+ messages in thread
From: Aravind Gopalakrishnan @ 2015-01-23 18:19 UTC (permalink / raw)
  To: a.p.zijlstra, paulus, mingo, acme, tglx, hpa, x86, linux-kernel
  Cc: Aravind Gopalakrishnan

The caller of force_ibs_eilvt_setup() is ibs_eilvt_setup()
which does not care about the return values.

So, marking it void and cleaning up the return statements.

Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@amd.com>
---
 arch/x86/kernel/cpu/perf_event_amd_ibs.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event_amd_ibs.c b/arch/x86/kernel/cpu/perf_event_amd_ibs.c
index a61f5c6..989d3c2 100644
--- a/arch/x86/kernel/cpu/perf_event_amd_ibs.c
+++ b/arch/x86/kernel/cpu/perf_event_amd_ibs.c
@@ -796,7 +796,7 @@ static int setup_ibs_ctl(int ibs_eilvt_off)
  * the IBS interrupt vector is handled by perf_ibs_cpu_notifier that
  * is using the new offset.
  */
-static int force_ibs_eilvt_setup(void)
+static void force_ibs_eilvt_setup(void)
 {
 	int offset;
 	int ret;
@@ -811,26 +811,24 @@ static int force_ibs_eilvt_setup(void)
 
 	if (offset == APIC_EILVT_NR_MAX) {
 		printk(KERN_DEBUG "No EILVT entry available\n");
-		return -EBUSY;
+		return;
 	}
 
 	ret = setup_ibs_ctl(offset);
 	if (ret)
 		goto out;
 
-	if (!ibs_eilvt_valid()) {
-		ret = -EFAULT;
+	if (!ibs_eilvt_valid())
 		goto out;
-	}
 
 	pr_info("IBS: LVT offset %d assigned\n", offset);
 
-	return 0;
+	return;
 out:
 	preempt_disable();
 	put_eilvt(offset);
 	preempt_enable();
-	return ret;
+	return;
 }
 
 static void ibs_eilvt_setup(void)
-- 
2.1.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tip:perf/core] perf/x86/amd/ibs: Convert force_ibs_eilvt_setup() to void
  2015-01-23 18:19 [PATCH] perf/x86/amd/ibs: Convert force_ibs_eilvt_setup to void Aravind Gopalakrishnan
@ 2015-02-18 17:13 ` tip-bot for Aravind Gopalakrishnan
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Aravind Gopalakrishnan @ 2015-02-18 17:13 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: tglx, linux-kernel, paulus, peterz, hpa, aravind.gopalakrishnan,
	torvalds, acme, mingo

Commit-ID:  c796b205b88c775fd220c1a63390bac6a8cdda3f
Gitweb:     http://git.kernel.org/tip/c796b205b88c775fd220c1a63390bac6a8cdda3f
Author:     Aravind Gopalakrishnan <aravind.gopalakrishnan@amd.com>
AuthorDate: Fri, 23 Jan 2015 12:19:35 -0600
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 18 Feb 2015 17:01:46 +0100

perf/x86/amd/ibs: Convert force_ibs_eilvt_setup() to void

The caller of force_ibs_eilvt_setup() is ibs_eilvt_setup()
which does not care about the return values.

So mark it void and clean up the return statements.

Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: <hpa@zytor.com>
Cc: <paulus@samba.org>
Cc: <tglx@linutronix.de>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/1422037175-20957-1-git-send-email-aravind.gopalakrishnan@amd.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/cpu/perf_event_amd_ibs.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event_amd_ibs.c b/arch/x86/kernel/cpu/perf_event_amd_ibs.c
index a61f5c6..989d3c2 100644
--- a/arch/x86/kernel/cpu/perf_event_amd_ibs.c
+++ b/arch/x86/kernel/cpu/perf_event_amd_ibs.c
@@ -796,7 +796,7 @@ static int setup_ibs_ctl(int ibs_eilvt_off)
  * the IBS interrupt vector is handled by perf_ibs_cpu_notifier that
  * is using the new offset.
  */
-static int force_ibs_eilvt_setup(void)
+static void force_ibs_eilvt_setup(void)
 {
 	int offset;
 	int ret;
@@ -811,26 +811,24 @@ static int force_ibs_eilvt_setup(void)
 
 	if (offset == APIC_EILVT_NR_MAX) {
 		printk(KERN_DEBUG "No EILVT entry available\n");
-		return -EBUSY;
+		return;
 	}
 
 	ret = setup_ibs_ctl(offset);
 	if (ret)
 		goto out;
 
-	if (!ibs_eilvt_valid()) {
-		ret = -EFAULT;
+	if (!ibs_eilvt_valid())
 		goto out;
-	}
 
 	pr_info("IBS: LVT offset %d assigned\n", offset);
 
-	return 0;
+	return;
 out:
 	preempt_disable();
 	put_eilvt(offset);
 	preempt_enable();
-	return ret;
+	return;
 }
 
 static void ibs_eilvt_setup(void)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-18 17:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-23 18:19 [PATCH] perf/x86/amd/ibs: Convert force_ibs_eilvt_setup to void Aravind Gopalakrishnan
2015-02-18 17:13 ` [tip:perf/core] perf/x86/amd/ibs: Convert force_ibs_eilvt_setup() " tip-bot for Aravind Gopalakrishnan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).