From: "tip-bot2 for Su Hui" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Su Hui <suhui@nfschina.com>, Thomas Gleixner <tglx@linutronix.de>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: timers/core] time/jiffies: Change register_refined_jiffies() to void __init
Date: Wed, 30 Apr 2025 07:22:21 -0000 [thread overview]
Message-ID: <174599774175.22196.10917731514907157768.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20250430032734.2079290-2-suhui@nfschina.com>
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 007c07168ac0c64387be500f6604b09ace3f3bdc
Gitweb: https://git.kernel.org/tip/007c07168ac0c64387be500f6604b09ace3f3bdc
Author: Su Hui <suhui@nfschina.com>
AuthorDate: Wed, 30 Apr 2025 11:27:32 +08:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Wed, 30 Apr 2025 09:06:23 +02:00
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
---
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 0ea8c98..91b2078 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 bc4db9e..34eeaca 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;
}
next prev parent reply other threads:[~2025-04-30 7:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-30 3:27 [PATCH v3 0/3] time: some cleanup for jiffies and alarmtimer Su Hui
2025-04-30 3:27 ` [PATCH v3 1/3] time/jiffies: change register_refined_jiffies() to void __init Su Hui
2025-04-30 7:22 ` tip-bot2 for Su Hui [this message]
2025-04-30 3:27 ` [PATCH v3 2/3] alarmtimer: remove dead return value in clock2alarm() Su Hui
2025-04-30 7:22 ` [tip: timers/core] alarmtimer: Remove " tip-bot2 for Su Hui
2025-04-30 22:14 ` [PATCH v3 2/3] alarmtimer: remove " John Stultz
2025-04-30 3:27 ` [PATCH v3 3/3] alarmtimer: switch some spin_{lock,unlock}_irqsave() to guard() Su Hui
2025-04-30 7:04 ` Thomas Gleixner
2025-04-30 7:19 ` Su Hui
2025-04-30 7:22 ` [tip: timers/core] alarmtimer: Switch spin_{lock,unlock}_irqsave() to guards tip-bot2 for Su Hui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=174599774175.22196.10917731514907157768.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=suhui@nfschina.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®