[PATCH] clocksource/drivers/arm_arch_timer: Mark validate_timer_rate() init

Stephen Boyd swboyd at chromium.org
Thu May 2 16:30:15 PDT 2024


Add the __init marking to validate_timer_rate() so that it gets
discarded after init.

  $ ./scripts/bloat-o-meter vmlinux.before vmlinux.after
  add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-8 (-8)
  Function                                     old     new   delta
  arch_timer_register                         1724    1716      -8
  Total: Before=69177808, After=69177800, chg -0.00%

Cc: Jisheng Zhang <jszhang at kernel.org>
Cc: Ionela Voinescu <ionela.voinescu at arm.com>
Cc: Marc Zyngier <maz at kernel.org>
Cc: Mark Rutland <mark.rutland at arm.com>
Signed-off-by: Stephen Boyd <swboyd at chromium.org>
---
 drivers/clocksource/arm_arch_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index 8d4a52056684..9c4a4af25d2c 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -1045,7 +1045,7 @@ static int arch_timer_starting_cpu(unsigned int cpu)
 	return 0;
 }
 
-static int validate_timer_rate(void)
+static int __init validate_timer_rate(void)
 {
 	if (!arch_timer_rate)
 		return -EINVAL;

base-commit: 4cece764965020c22cff7665b18a012006359095
-- 
https://chromeos.dev




More information about the linux-arm-kernel mailing list