From: Thorsten Blum Date: Mon, 15 Sep 2025 12:05:39 +0000 (+0200) Subject: xtensa: use HZ_PER_MHZ in platform_calibrate_ccount X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=4c8bad3ed035ab85ad9b0d247154be43a53ef84d;p=users%2Fhch%2Fmisc.git xtensa: use HZ_PER_MHZ in platform_calibrate_ccount Replace the hardcoded 1000000UL with the HZ_PER_MHZ unit macro, and add a space in "10 MHz" to improve the readability of the error message. Signed-off-by: Thorsten Blum Message-Id: <20250915120540.2150841-3-thorsten.blum@linux.dev> Signed-off-by: Max Filippov --- diff --git a/arch/xtensa/kernel/platform.c b/arch/xtensa/kernel/platform.c index 926b8bf0f14c..f14713060fd4 100644 --- a/arch/xtensa/kernel/platform.c +++ b/arch/xtensa/kernel/platform.c @@ -14,6 +14,7 @@ #include #include +#include #include #include @@ -38,7 +39,7 @@ void __weak platform_idle(void) #ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT void __weak platform_calibrate_ccount(void) { - pr_err("ERROR: Cannot calibrate cpu frequency! Assuming 10MHz.\n"); - ccount_freq = 10 * 1000000UL; + pr_err("ERROR: Cannot calibrate cpu frequency! Assuming 10 MHz.\n"); + ccount_freq = 10 * HZ_PER_MHZ; } #endif