Merge branches 'work.misc' and 'work.dcache' of git://git.kernel.org/pub/scm/linux...
[sfrench/cifs-2.6.git] / kernel / torture.c
index 3de1efbecd6a3cad4c47b1e09e649969f5ea3b0d..1ac24a826589353396f02c98150049d134e6e7dd 100644 (file)
@@ -20,6 +20,9 @@
  * Author: Paul E. McKenney <paulmck@us.ibm.com>
  *     Based on kernel/rcu/torture.c.
  */
+
+#define pr_fmt(fmt) fmt
+
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
@@ -53,7 +56,7 @@ MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Paul E. McKenney <paulmck@us.ibm.com>");
 
 static char *torture_type;
-static bool verbose;
+static int verbose;
 
 /* Mediate rmmod and system shutdown.  Concurrent rmmod & shutdown illegal! */
 #define FULLSTOP_DONTSTOP 0    /* Normal operation. */
@@ -98,7 +101,7 @@ bool torture_offline(int cpu, long *n_offl_attempts, long *n_offl_successes,
        if (!cpu_online(cpu) || !cpu_is_hotpluggable(cpu))
                return false;
 
-       if (verbose)
+       if (verbose > 1)
                pr_alert("%s" TORTURE_FLAG
                         "torture_onoff task: offlining %d\n",
                         torture_type, cpu);
@@ -111,7 +114,7 @@ bool torture_offline(int cpu, long *n_offl_attempts, long *n_offl_successes,
                                 "torture_onoff task: offline %d failed: errno %d\n",
                                 torture_type, cpu, ret);
        } else {
-               if (verbose)
+               if (verbose > 1)
                        pr_alert("%s" TORTURE_FLAG
                                 "torture_onoff task: offlined %d\n",
                                 torture_type, cpu);
@@ -147,7 +150,7 @@ bool torture_online(int cpu, long *n_onl_attempts, long *n_onl_successes,
        if (cpu_online(cpu) || !cpu_is_hotpluggable(cpu))
                return false;
 
-       if (verbose)
+       if (verbose > 1)
                pr_alert("%s" TORTURE_FLAG
                         "torture_onoff task: onlining %d\n",
                         torture_type, cpu);
@@ -160,7 +163,7 @@ bool torture_online(int cpu, long *n_onl_attempts, long *n_onl_successes,
                                 "torture_onoff task: online %d failed: errno %d\n",
                                 torture_type, cpu, ret);
        } else {
-               if (verbose)
+               if (verbose > 1)
                        pr_alert("%s" TORTURE_FLAG
                                 "torture_onoff task: onlined %d\n",
                                 torture_type, cpu);
@@ -647,7 +650,7 @@ static void torture_stutter_cleanup(void)
  * The runnable parameter points to a flag that controls whether or not
  * the test is currently runnable.  If there is no such flag, pass in NULL.
  */
-bool torture_init_begin(char *ttype, bool v)
+bool torture_init_begin(char *ttype, int v)
 {
        mutex_lock(&fullstop_mutex);
        if (torture_type != NULL) {