mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +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
This commit is contained in:
committed by
Thomas Gleixner
parent
1b51577187
commit
2838bdb772
@@ -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
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user