Skip to content

Commit 4c8bad3

Browse files
tobluxjcmvbkbc
authored andcommitted
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 <thorsten.blum@linux.dev> Message-Id: <20250915120540.2150841-3-thorsten.blum@linux.dev> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
1 parent 5d5f08f commit 4c8bad3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

arch/xtensa/kernel/platform.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
#include <linux/printk.h>
1616
#include <linux/types.h>
17+
#include <linux/units.h>
1718
#include <asm/platform.h>
1819
#include <asm/timex.h>
1920

@@ -38,7 +39,7 @@ void __weak platform_idle(void)
3839
#ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT
3940
void __weak platform_calibrate_ccount(void)
4041
{
41-
pr_err("ERROR: Cannot calibrate cpu frequency! Assuming 10MHz.\n");
42-
ccount_freq = 10 * 1000000UL;
42+
pr_err("ERROR: Cannot calibrate cpu frequency! Assuming 10 MHz.\n");
43+
ccount_freq = 10 * HZ_PER_MHZ;
4344
}
4445
#endif

0 commit comments

Comments
 (0)