perf/x86/amd/ibs: Convert force_ibs_eilvt_setup() to void
authorAravind Gopalakrishnan <aravind.gopalakrishnan@amd.com>
Fri, 23 Jan 2015 18:19:35 +0000 (12:19 -0600)
committerIngo Molnar <mingo@kernel.org>
Wed, 18 Feb 2015 16:01:46 +0000 (17:01 +0100)
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

index a61f5c6911daac339588b9099e5b897a3ef9d774..989d3c215d2bcea3b1a55bc2e8a42d9e20b31a98 100644 (file)
@@ -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)