public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clocksource: Update registration failure behavior documentation
@ 2026-02-10  2:56 Zhan Xusheng
  2026-02-11 13:10 ` Thomas Gleixner
  0 siblings, 1 reply; 2+ messages in thread
From: Zhan Xusheng @ 2026-02-10  2:56 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-kernel, Zhan Xusheng

The documentation for clocksource registration functions has been updated
to clarify the failure behavior. Specifically, the return value on failure
is no longer an error code (-EBUSY). Instead, the function will issue
warnings but always return 0 on failure, as previously successful
registration attempts might still leave the system in an inconsistent
state.

Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>
---
 kernel/time/clocksource.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index df7194961658..6a56282dbd08 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -1228,7 +1228,8 @@ EXPORT_SYMBOL_GPL(__clocksource_update_freq_scale);
  * @scale:	Scale factor multiplied against freq to get clocksource hz
  * @freq:	clocksource frequency (cycles per second) divided by scale
  *
- * Returns -EBUSY if registration fails, zero otherwise.
+ * Returns 0 on success. On failure, it will issue warnings but will not return
+ * a specific error code.
  *
  * This *SHOULD NOT* be called directly! Please use the
  * clocksource_register_hz() or clocksource_register_khz helper functions.
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-02-11 13:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-10  2:56 [PATCH] clocksource: Update registration failure behavior documentation Zhan Xusheng
2026-02-11 13:10 ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox