mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Thomas Weißschuh (Schneider Electric)" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: thomas.weissschuh@linutronix.de,
	Thomas Gleixner <tglx@kernel.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: timers/core] timekeeping: Annotate auxiliary clock accessors with __must_check
Date: Tue, 11 Aug 2026 09:16:36 -0000	[thread overview]
Message-ID: <178643979652.442315.16714804183580008769.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260731-timekeeping-aux-must-check-v1-2-11ae93068497@linutronix.de>

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     2838bdb772e4e94591a90437bf595dba485a3162
Gitweb:        https://git.kernel.org/tip/2838bdb772e4e94591a90437bf595dba485a3162
Author:        Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
AuthorDate:    Fri, 31 Jul 2026 16:20:15 +02:00
Committer:     Thomas Gleixner <tglx@kernel.org>
CommitterDate: Tue, 11 Aug 2026 11:12:43 +02:00

timekeeping: Annotate auxiliary clock accessors with __must_check

In contrast to the system time accessors, the ones for auxiliary clocks can
fail.

Make sure the callers check for this.

Signed-off-by: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260731-timekeeping-aux-must-check-v1-2-11ae93068497@linutronix.de
---
 include/linux/timekeeping.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h
index ca4a881..561313b 100644
--- a/include/linux/timekeeping.h
+++ b/include/linux/timekeeping.h
@@ -267,11 +267,14 @@ extern void timekeeping_inject_sleeptime64(const struct timespec64 *delta);
  * Auxiliary clock interfaces
  */
 #ifdef CONFIG_POSIX_AUX_CLOCKS
-extern bool ktime_get_aux(clockid_t id, ktime_t *kt);
-extern bool ktime_get_aux_ts64(clockid_t id, struct timespec64 *kt);
+extern bool __must_check ktime_get_aux(clockid_t id, ktime_t *kt);
+extern bool __must_check ktime_get_aux_ts64(clockid_t id, struct timespec64 *kt);
 #else
-static inline bool ktime_get_aux(clockid_t id, ktime_t *kt) { return false; }
-static inline bool ktime_get_aux_ts64(clockid_t id, struct timespec64 *kt) { return false; }
+static inline bool __must_check ktime_get_aux(clockid_t id, ktime_t *kt) { return false; }
+static inline bool __must_check ktime_get_aux_ts64(clockid_t id, struct timespec64 *kt)
+{
+	return false;
+}
 #endif
 
 /**

      reply	other threads:[~2026-08-11  9:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-31 14:20 [PATCH 0/2] " Thomas Weißschuh (Schneider Electric)
2026-07-31 14:20 ` [PATCH 1/2] timekeeping: Remove the unused ktime_get_clock_ts64() Thomas Weißschuh (Schneider Electric)
2026-08-11  9:16   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh (Schneider Electric)
2026-07-31 14:20 ` [PATCH 2/2] timekeeping: Annotate auxiliary clock accessors with __must_check Thomas Weißschuh (Schneider Electric)
2026-08-11  9:16   ` tip-bot2 for Thomas Weißschuh (Schneider Electric) [this message]

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=178643979652.442315.16714804183580008769.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=tglx@kernel.org \
    --cc=thomas.weissschuh@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®