Skip to content

Commit 007c071

Browse files
Su HuiKAGA-KOKO
authored andcommitted
time/jiffies: Change register_refined_jiffies() to void __init
register_refined_jiffies() is only used in setup code and always returns 0. Mark it as __init to save some bytes and change it to void. Signed-off-by: Su Hui <suhui@nfschina.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250430032734.2079290-2-suhui@nfschina.com
1 parent 49916e2 commit 007c071

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

include/linux/jiffies.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
/* LATCH is used in the interval timer and ftape setup. */
6060
#define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */
6161

62-
extern int register_refined_jiffies(long clock_tick_rate);
62+
extern void register_refined_jiffies(long clock_tick_rate);
6363

6464
/* TICK_USEC is the time between ticks in usec assuming SHIFTED_HZ */
6565
#define TICK_USEC ((USEC_PER_SEC + HZ/2) / HZ)

kernel/time/jiffies.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,11 @@ struct clocksource * __init __weak clocksource_default_clock(void)
7575

7676
static struct clocksource refined_jiffies;
7777

78-
int register_refined_jiffies(long cycles_per_second)
78+
void __init register_refined_jiffies(long cycles_per_second)
7979
{
8080
u64 nsec_per_tick, shift_hz;
8181
long cycles_per_tick;
8282

83-
84-
8583
refined_jiffies = clocksource_jiffies;
8684
refined_jiffies.name = "refined-jiffies";
8785
refined_jiffies.rating++;
@@ -100,5 +98,4 @@ int register_refined_jiffies(long cycles_per_second)
10098
refined_jiffies.mult = ((u32)nsec_per_tick) << JIFFIES_SHIFT;
10199

102100
__clocksource_register(&refined_jiffies);
103-
return 0;
104101
}

0 commit comments

Comments
 (0)