History

scftorture: Always log error message

Unconditionally log messages corresponding to errors.

Li Zhijian committed 5 years ago

Commit 809da9b1 parent 86e7ed11 file · +4 −5Browse files

Unified · Split

kernel/scftorture.c+4−5
@@ -41,8 +41,7 @@ · 40 unmodified lines
4141 #define VERBOSE_SCFTORTOUT(s, x...) \
4242 do { if (verbose) pr_alert(SCFTORT_FLAG s "\n", ## x); } while (0)
4343
44−#define VERBOSE_SCFTORTOUT_ERRSTRING(s, x...) \
45− do { if (verbose) pr_alert(SCFTORT_FLAG "!!! " s "\n", ## x); } while (0)
44+#define SCFTORTOUT_ERRSTRING(s, x...) pr_alert(SCFTORT_FLAG "!!! " s "\n", ## x)
4645
4746 MODULE_LICENSE("GPL");
4847 MODULE_AUTHOR("Paul E. McKenney <paulmck@kernel.org>");
@@ -584,14 +583,14 @@ static int __init scf_torture_init(void) · 535 unmodified lines
584583 if (weight_resched1 == 0 && weight_single1 == 0 && weight_single_rpc1 == 0 &&
585584 weight_single_wait1 == 0 && weight_many1 == 0 && weight_many_wait1 == 0 &&
586585 weight_all1 == 0 && weight_all_wait1 == 0) {
587− VERBOSE_SCFTORTOUT_ERRSTRING("all zero weights makes no sense");
586+ SCFTORTOUT_ERRSTRING("all zero weights makes no sense");
588587 firsterr = -EINVAL;
589588 goto unwind;
590589 }
591590 if (IS_BUILTIN(CONFIG_SCF_TORTURE_TEST))
592591 scf_sel_add(weight_resched1, SCF_PRIM_RESCHED, false);
593592 else if (weight_resched1)
594− VERBOSE_SCFTORTOUT_ERRSTRING("built as module, weight_resched ignored");
593+ SCFTORTOUT_ERRSTRING("built as module, weight_resched ignored");
595594 scf_sel_add(weight_single1, SCF_PRIM_SINGLE, false);
596595 scf_sel_add(weight_single_rpc1, SCF_PRIM_SINGLE_RPC, true);
597596 scf_sel_add(weight_single_wait1, SCF_PRIM_SINGLE, true);
@@ -622,7 +621,7 @@ static int __init scf_torture_init(void) · 24 unmodified lines
622621 nthreads = num_online_cpus();
623622 scf_stats_p = kcalloc(nthreads, sizeof(scf_stats_p[0]), GFP_KERNEL);
624623 if (!scf_stats_p) {
625− VERBOSE_SCFTORTOUT_ERRSTRING("out of memory");
624+ SCFTORTOUT_ERRSTRING("out of memory");
626625 firsterr = -ENOMEM;
627626 goto unwind;
628627 }