From nobody Sun Jun 21 00:15:36 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B9C0840DFA6 for ; Thu, 9 Apr 2026 12:52:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775739181; cv=none; b=kQTxAMM2RZZbkRKVpygnIFEPq/A/vpb5YQygn7eAyLFQa26czTGGIZjIFYZ7UHJ422T+eYWqT8iwUpjl9CkT6MOKu2hSPVageSW1Y2ghbGfqf6c7CwaMNmZFvNUsAAu5BKIbpbW2WE4+5qaSJhwuQb6bPCEGwpDr9ct5X97Lh7E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775739181; c=relaxed/simple; bh=+vIiQedL3yDVEGGtzX2igB+lt/6OzHvna/oCCo771Yc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=SHxSfCvmWa/3W5cNZLzwGpfqYEkM4Ku/hlRQkd8ZpgykCy4p/gLiAqhSpn6Zk1sBkQls7FiOc2ylqEVTQGV4M3L+AomAivtyWflwfb3kXBwWilTHNZu52sur9yxxWBo0DT5jgkA9eTfTvK/J3HQWiTzvl5v1ctUUbNGkwknP5Jo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=2rCaHK5/; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=4OyMNnTA; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="2rCaHK5/"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="4OyMNnTA" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1775739177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XCQMk4YK7BjvzcyloAtQOWDoku2AtdC+uNtiWyHOxxI=; b=2rCaHK5/p391DWOZKLBF7S5RHJTTcMhyCVhGU97amldjFD/y1UGH8yHpTfW7hYFGrhwHvO o2hwA3ctGNX7VX4XkAsgLmlq1r/FyEjIC7TSlMYlBqa5iWWvT3zfrg7jDfqlrVyXU5ibcx +vABM8hd0YIDvqd1KbiJ/3sMJPouh5Xbq1TDfMUz3WalqfyunFPMnmWvaanhq0Ar5rjBUL LipUJA8l2q4+t7MKwcLHoe6e/CZ2CxevOpNyKT8CqUsflXC0oh5DyIuh+7QxYcMlpJUs1w VJ8yyr7KS4Jf+mZqnrcjJBc4KxYX/0qgXurp5bVJvBIVJ5Jatifh+X0QoxXczg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1775739177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XCQMk4YK7BjvzcyloAtQOWDoku2AtdC+uNtiWyHOxxI=; b=4OyMNnTAYr/RVzxI8cnx8mZ8buZB4csqXGzTYcrISPdzKiIsDap6reFtBurP77zLfuIw18 ZVIm+CRR5/9kVHBA== Date: Thu, 09 Apr 2026 14:52:56 +0200 Subject: [PATCH] clocksource: Clean up clocksource_update_freq() functions Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260409-clocksource-update_freq-v1-1-2050ae0f369f@linutronix.de> X-B4-Tracking: v=1; b=H4sIAAAAAAAC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIzMDEwNL3eSc/OTs4vzSouRU3dKClMSS1Pi0otRCXVNzk9Rkc9MkSwNzCyW g7oKi1LTMCrDJ0bG1tQCz6VkFaQAAAA== X-Change-ID: 20260409-clocksource-update_freq-574ec75b9078 To: John Stultz , Thomas Gleixner , Stephen Boyd Cc: linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1775739177; l=2991; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=+vIiQedL3yDVEGGtzX2igB+lt/6OzHvna/oCCo771Yc=; b=tFh1BhuXCcMcviK/xNSWmvtUYwzwT4mPtiRicyo+lpSCkkTkcZnf6yKtAMWkj1RbGUnGVMZO5 VwJE/Ye66SnAYtdSGN9wiTtvgvcig3gPHVSrWy47CvcCJ6vy/OA3s1O X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= Remove the unused functions __clocksource_update_freq_hz() and __clocksource_update_freq_khz(). Then make __clocksource_update_freq_scale() static as it is not used from external callers anymore. Also clean up the comment accordingly. Signed-off-by: Thomas Wei=C3=9Fschuh Acked-by: John Stultz --- include/linux/clocksource.h | 12 ------------ kernel/time/clocksource.c | 9 +-------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index ccf5c0ca26b7..1afe841d268f 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h @@ -240,8 +240,6 @@ clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from,= u32 to, u32 minsec); */ extern int __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq); -extern void -__clocksource_update_freq_scale(struct clocksource *cs, u32 scale, u32 fre= q); =20 /* * Don't call this unless you are a default clocksource @@ -262,16 +260,6 @@ static inline int clocksource_register_khz(struct cloc= ksource *cs, u32 khz) return __clocksource_register_scale(cs, 1000, khz); } =20 -static inline void __clocksource_update_freq_hz(struct clocksource *cs, u3= 2 hz) -{ - __clocksource_update_freq_scale(cs, 1, hz); -} - -static inline void __clocksource_update_freq_khz(struct clocksource *cs, u= 32 khz) -{ - __clocksource_update_freq_scale(cs, 1000, khz); -} - #ifdef CONFIG_ARCH_CLOCKSOURCE_INIT extern void clocksource_arch_init(struct clocksource *cs); #else diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index baee13a1f87f..f8d15ed3ec98 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c @@ -1222,14 +1222,8 @@ static void clocksource_enqueue(struct clocksource *= cs) * @cs: clocksource to be registered * @scale: Scale factor multiplied against freq to get clocksource hz * @freq: clocksource frequency (cycles per second) divided by scale - * - * This should only be called from the clocksource->enable() method. - * - * This *SHOULD NOT* be called directly! Please use the - * __clocksource_update_freq_hz() or __clocksource_update_freq_khz() helper - * functions. */ -void __clocksource_update_freq_scale(struct clocksource *cs, u32 scale, u3= 2 freq) +static void __clocksource_update_freq_scale(struct clocksource *cs, u32 sc= ale, u32 freq) { u64 sec; =20 @@ -1287,7 +1281,6 @@ void __clocksource_update_freq_scale(struct clocksour= ce *cs, u32 scale, u32 freq pr_info("%s: mask: 0x%llx max_cycles: 0x%llx, max_idle_ns: %lld ns\n", cs->name, cs->mask, cs->max_cycles, cs->max_idle_ns); } -EXPORT_SYMBOL_GPL(__clocksource_update_freq_scale); =20 /** * __clocksource_register_scale - Used to install new clocksources --- base-commit: 9734946b6c4065628972b6eb2cc79a6d7ce8fce4 change-id: 20260409-clocksource-update_freq-574ec75b9078 Best regards, -- =20 Thomas Wei=C3=9Fschuh