]> xenbits.xensource.com Git - xen.git/commitdiff
smp_call_function/on_selected_cpus/on_each_cpu all return void.
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 1 Jun 2010 10:04:08 +0000 (11:04 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 1 Jun 2010 10:04:08 +0000 (11:04 +0100)
None of them can fail, so a return code is pointless.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/ia64/linux-xen/perfmon.c
xen/arch/ia64/linux-xen/smp.c
xen/arch/x86/cpu/mcheck/mce.c
xen/arch/x86/smp.c
xen/arch/x86/x86_32/traps.c
xen/include/xen/smp.h

index 10869bfb76982575b90a191be8761e879b810952..18f8be9d7f4557013942bad6264a4aa115125610 100644 (file)
@@ -6895,11 +6895,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;
@@ -6926,7 +6922,6 @@ int
 pfm_remove_alt_pmu_interrupt(pfm_intr_handler_desc_t *hdl)
 {
        int i;
-       int ret;
 
        if (hdl == NULL) return -EINVAL;
 
@@ -6940,10 +6935,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);
index 523f739064eb7c7c8121d3ddaeb06889c82e0224..40bb8817dd107d8efddae5425ea2cb42a6126854 100644 (file)
@@ -386,14 +386,14 @@ EXPORT_SYMBOL(smp_call_function_single);
  * You must not call this function with disabled interrupts or from a
  * hardware interrupt handler or from a bottom half handler.
  */
-int
+void
 smp_call_function (void (*func) (void *info), void *info, int wait)
 {
        struct call_data_struct data;
        int cpus = num_online_cpus()-1;
 
        if (!cpus)
-               return 0;
+               return;
 
        /* Can deadlock when called with interrupts disabled */
 #ifdef XEN
@@ -435,12 +435,11 @@ smp_call_function (void (*func) (void *info), void *info, int wait)
 #if 0 //def XEN
        printk("smp_call_function: DONE WITH spin_unlock, returning \n");
 #endif
-       return 0;
 }
 EXPORT_SYMBOL(smp_call_function);
 
 #ifdef XEN
-int
+void
 on_selected_cpus(const cpumask_t *selected, void (*func) (void *info),
                  void *info, int wait)
 {
@@ -450,7 +449,7 @@ on_selected_cpus(const cpumask_t *selected, void (*func) (void *info),
        ASSERT(local_irq_is_enabled());
 
        if (!nr_cpus)
-               return 0;
+               return;
 
        data.func = func;
        data.info = info;
@@ -470,8 +469,6 @@ on_selected_cpus(const cpumask_t *selected, void (*func) (void *info),
                cpu_relax();
 
        spin_unlock(&call_lock);
-
-       return 0;
 }
 #endif
 
index b94afdc2dd54df74cb5110d8fbfcad934453a420..b5222795ebc607b225c0dcae79eebfc1595f811f 100644 (file)
@@ -1356,11 +1356,7 @@ long do_mca(XEN_GUEST_HANDLE(xen_mc_t) u_xen_mc)
                        log_cpus = xmalloc_array(xen_mc_logical_cpu_t, nlcpu);
                        if (log_cpus == NULL)
                                return x86_mcerr("do_mca cpuinfo", -ENOMEM);
-
-                       if (on_each_cpu(do_mc_get_cpu_info, log_cpus, 1)) {
-                               xfree(log_cpus);
-                               return x86_mcerr("do_mca cpuinfo", -EIO);
-                       }
+                       on_each_cpu(do_mc_get_cpu_info, log_cpus, 1);
                        if (!is_pv_32on64_vcpu(v)
                            ? copy_to_guest(mc_physcpuinfo.nat->info,
                                            log_cpus, nlcpu)
index 0483ac5f10fe8dc90cc563f377759f3df00d2f2c..650835ff1f76685fa2fd37d07da79551df92bf60 100644 (file)
@@ -274,17 +274,17 @@ static struct call_data_struct {
     cpumask_t selected;
 } call_data;
 
-int smp_call_function(
+void smp_call_function(
     void (*func) (void *info),
     void *info,
     int wait)
 {
     cpumask_t allbutself = cpu_online_map;
     cpu_clear(smp_processor_id(), allbutself);
-    return on_selected_cpus(&allbutself, func, info, wait);
+    on_selected_cpus(&allbutself, func, info, wait);
 }
 
-int on_selected_cpus(
+void on_selected_cpus(
     const cpumask_t *selected,
     void (*func) (void *info),
     void *info,
@@ -323,7 +323,6 @@ int on_selected_cpus(
 
  out:
     spin_unlock(&call_lock);
-    return 0;
 }
 
 static void __stop_this_cpu(void)
index eb6154c34fb15b49081db43afd1a40064d3e2e8d..a233c8307e1e64260ef36bee8e84705dd8833b6e 100644 (file)
@@ -437,8 +437,8 @@ static long register_guest_callback(struct callback_register *reg)
     case CALLBACKTYPE_sysenter_deprecated:
         if ( !cpu_has_sep )
             ret = -EINVAL;
-        else if ( on_each_cpu(do_update_sysenter, &reg->address, 1) != 0 )
-            ret = -EIO;
+        else
+            on_each_cpu(do_update_sysenter, &reg->address, 1);
         break;
 
     case CALLBACKTYPE_sysenter:
index 6d7dca421190b3613aaf51b0ff93942cef54bde6..47792b53a449175a3dc8f47b2e04b47646d56c96 100644 (file)
@@ -28,7 +28,7 @@ extern void smp_cpus_done(unsigned int max_cpus);
 /*
  * Call a function on all other processors
  */
-extern int smp_call_function(
+extern void smp_call_function(
     void (*func) (void *info),
     void *info,
     int wait);
@@ -36,7 +36,7 @@ extern int smp_call_function(
 /* 
  * Call a function on a selection of processors
  */
-extern int on_selected_cpus(
+extern void on_selected_cpus(
     const cpumask_t *selected,
     void (*func) (void *info),
     void *info,
@@ -51,12 +51,12 @@ void smp_prepare_boot_cpu(void);
 /*
  * Call a function on all processors
  */
-static inline int on_each_cpu(
+static inline void on_each_cpu(
     void (*func) (void *info),
     void *info,
     int wait)
 {
-    return on_selected_cpus(&cpu_online_map, func, info, wait);
+    on_selected_cpus(&cpu_online_map, func, info, wait);
 }
 
 #define smp_processor_id() raw_smp_processor_id()