aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2017-02-15 04:24:25 -0500
committerMichael Ellerman <mpe@ellerman.id.au>2017-02-15 04:24:25 -0500
commit0d2b5cdc76ff7eef9d727c2e802213ec15d5e94f (patch)
treebff2abc14b7f0afd0be37733f885f600e2628498
parent454593e54cac126a0f49d4b65f90a5e518c51404 (diff)
powerpc/64e: Fix bogus usage of WARN_ONCE()
WARN_ONCE() takes a condition and a format string. We were passing a constant string as the condition, and the function name as the format string. It would work, but the message would be just the function name. Fix it by just using WARN_ONCE() directly instead of if (x) WARN_ONCE(). Noticed-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--arch/powerpc/kernel/setup_64.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index b9855f1b290a..adf2084f214b 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -113,14 +113,12 @@ void __init setup_tlb_core_data(void)
113 * If we have threads, we need either tlbsrx. 113 * If we have threads, we need either tlbsrx.
114 * or e6500 tablewalk mode, or else TLB handlers 114 * or e6500 tablewalk mode, or else TLB handlers
115 * will be racy and could produce duplicate entries. 115 * will be racy and could produce duplicate entries.
116 * Should we panic instead?
116 */ 117 */
117 if (smt_enabled_at_boot >= 2 && 118 WARN_ONCE(smt_enabled_at_boot >= 2 &&
118 !mmu_has_feature(MMU_FTR_USE_TLBRSRV) && 119 !mmu_has_feature(MMU_FTR_USE_TLBRSRV) &&
119 book3e_htw_mode != PPC_HTW_E6500) { 120 book3e_htw_mode != PPC_HTW_E6500,
120 /* Should we panic instead? */ 121 "%s: unsupported MMU configuration\n", __func__);
121 WARN_ONCE("%s: unsupported MMU configuration -- expect problems\n",
122 __func__);
123 }
124 } 122 }
125} 123}
126#endif 124#endif