From: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
To: Anna-Maria Behnsen <anna-maria@linutronix.de>,
Frederic Weisbecker <frederic@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org,
"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Subject: [PATCH 2/3] hrtimer: Remove public definition of HIGH_RES_NSEC
Date: Wed, 07 Jan 2026 11:36:57 +0100 [thread overview]
Message-ID: <20260107-hrtimer-header-cleanup-v1-2-1a698ef0ddae@linutronix.de> (raw)
In-Reply-To: <20260107-hrtimer-header-cleanup-v1-0-1a698ef0ddae@linutronix.de>
This constant is only used in a single place and is has a very generic
name polluting the global namespace.
Move the constant closer to its only user.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
include/linux/hrtimer_defs.h | 12 ------------
kernel/time/hrtimer.c | 8 ++++++++
2 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/include/linux/hrtimer_defs.h b/include/linux/hrtimer_defs.h
index e0280d851455..02b010df6570 100644
--- a/include/linux/hrtimer_defs.h
+++ b/include/linux/hrtimer_defs.h
@@ -6,18 +6,6 @@
#include <linux/timerqueue.h>
#include <linux/seqlock.h>
-#ifdef CONFIG_HIGH_RES_TIMERS
-
-/*
- * The resolution of the clocks. The resolution value is returned in
- * the clock_getres() system call to give application programmers an
- * idea of the (in)accuracy of timers. Timer values are rounded up to
- * this resolution values.
- */
-# define HIGH_RES_NSEC 1
-
-#endif
-
#ifdef CONFIG_64BIT
# define __hrtimer_clock_base_align ____cacheline_aligned
#else
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index f8ea8c8fc895..2d319f8aff14 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -49,6 +49,14 @@
#include "tick-internal.h"
+/*
+ * The resolution of the clocks. The resolution value is returned in
+ * the clock_getres() system call to give application programmers an
+ * idea of the (in)accuracy of timers. Timer values are rounded up to
+ * this resolution values.
+ */
+#define HIGH_RES_NSEC 1
+
/*
* Masks for selecting the soft and hard context timers from
* cpu_base->active
--
2.52.0
next prev parent reply other threads:[~2026-01-07 10:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-07 10:36 [PATCH 0/3] hrtimer: Some header cleanups Thomas Weißschuh
2026-01-07 10:36 ` [PATCH 1/3] hrtimer: Remove unused resolution constants Thomas Weißschuh
2026-01-13 10:06 ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh
2026-01-07 10:36 ` Thomas Weißschuh [this message]
2026-01-13 10:06 ` [tip: timers/core] hrtimer: Remove public definition of HIGH_RES_NSEC tip-bot2 for Thomas Weißschuh
2026-01-07 10:36 ` [PATCH 3/3] hrtimer: Drop _tv64() helpers Thomas Weißschuh
2026-01-13 10:06 ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh
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=20260107-hrtimer-header-cleanup-v1-2-1a698ef0ddae@linutronix.de \
--to=thomas.weissschuh@linutronix.de \
--cc=anna-maria@linutronix.de \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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®