Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d2b5cdc authored by Michael Ellerman's avatar Michael Ellerman
Browse files

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: default avatarGeliang Tang <geliangtang@163.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 454593e5
Loading
Loading
Loading
Loading
+5 −7
Original line number Original line Diff line number Diff line
@@ -113,14 +113,12 @@ void __init setup_tlb_core_data(void)
		 * If we have threads, we need either tlbsrx.
		 * If we have threads, we need either tlbsrx.
		 * or e6500 tablewalk mode, or else TLB handlers
		 * or e6500 tablewalk mode, or else TLB handlers
		 * will be racy and could produce duplicate entries.
		 * will be racy and could produce duplicate entries.
		 * Should we panic instead?
		 */
		 */
		if (smt_enabled_at_boot >= 2 &&
		WARN_ONCE(smt_enabled_at_boot >= 2 &&
			  !mmu_has_feature(MMU_FTR_USE_TLBRSRV) &&
			  !mmu_has_feature(MMU_FTR_USE_TLBRSRV) &&
		    book3e_htw_mode != PPC_HTW_E6500) {
			  book3e_htw_mode != PPC_HTW_E6500,
			/* Should we panic instead? */
			  "%s: unsupported MMU configuration\n", __func__);
			WARN_ONCE("%s: unsupported MMU configuration -- expect problems\n",
				  __func__);
		}
	}
	}
}
}
#endif
#endif