[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250424144819.24884-2-suhui@nfschina.com>
Date: Thu, 24 Apr 2025 22:48:18 +0800
From: Su Hui <suhui@...china.com>
To: john.stultz@...aro.org,
tglx@...utronix.de
Cc: Su Hui <suhui@...china.com>,
eahariha@...ux.microsoft.com,
anna-maria@...utronix.de,
geert@...ux-m68k.org,
ojeda@...nel.org,
linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: [PATCH 1/3] time/jiffies: change register_refined_jiffies() to void __init
register_refined_jiffies() is only used in setup code and always return 0.
Mark it to __init to save some bytes and change it to void.
Signed-off-by: Su Hui <suhui@...china.com>
---
include/linux/jiffies.h | 2 +-
kernel/time/jiffies.c | 5 +----
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h
index 0ea8c9887429..91b20788273d 100644
--- a/include/linux/jiffies.h
+++ b/include/linux/jiffies.h
@@ -59,7 +59,7 @@
/* LATCH is used in the interval timer and ftape setup. */
#define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */
-extern int register_refined_jiffies(long clock_tick_rate);
+extern void register_refined_jiffies(long clock_tick_rate);
/* TICK_USEC is the time between ticks in usec assuming SHIFTED_HZ */
#define TICK_USEC ((USEC_PER_SEC + HZ/2) / HZ)
diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c
index bc4db9e5ab70..34eeacac2253 100644
--- a/kernel/time/jiffies.c
+++ b/kernel/time/jiffies.c
@@ -75,13 +75,11 @@ struct clocksource * __init __weak clocksource_default_clock(void)
static struct clocksource refined_jiffies;
-int register_refined_jiffies(long cycles_per_second)
+void __init register_refined_jiffies(long cycles_per_second)
{
u64 nsec_per_tick, shift_hz;
long cycles_per_tick;
-
-
refined_jiffies = clocksource_jiffies;
refined_jiffies.name = "refined-jiffies";
refined_jiffies.rating++;
@@ -100,5 +98,4 @@ int register_refined_jiffies(long cycles_per_second)
refined_jiffies.mult = ((u32)nsec_per_tick) << JIFFIES_SHIFT;
__clocksource_register(&refined_jiffies);
- return 0;
}
--
2.30.2
Powered by blists - more mailing lists