From nobody Sun Jun 14 04:20:27 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 136F12D238A for ; Mon, 4 May 2026 06:54:38 +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=1777877680; cv=none; b=t0Vngh0sTgNzLU0w4F7QM1Ouko2ZMJvNGZbchdvSikHI1Ulv0FB4wVyor0/Y/zPIKsn6SMgCKdv3TzRp4rgDry4L7elOSpvD57MExv5SH1FoaCVJeKCEsUGtfgAch7zQc3jJTAcp2c6yr/YsFQDNjXp+TjuWuSp4bdkEdhrzob8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777877680; c=relaxed/simple; bh=mOUNKKCNA9pzewF+LBXELXIE98vcEPtVhpGxEBnuZx4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=A+Fz1MA4Sgs80yT/udhZrKvGeFmXSmTdw6EgsjmV0UXAnj208eU6++sVrOCm4P/nEP2dlmMDshpzEb/iPUEMwm+GiH6I/zIdF10iZnvfq2w5L8BzJ3fWdHDt3/TYTrwQ7IQKaCCBmW2WPCoATIrkXNKYxnfm1UMJpQTntH4mW4c= 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=Y55mNHAV; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=qOelG+TS; 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="Y55mNHAV"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="qOelG+TS" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1777877675; 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=+Y6H4ozIoax04CEITLv7/fggvzkxj+DnDFq4PI2vhNQ=; b=Y55mNHAVCqyuZq/m51FmVOBkQGCR1Sh+x9jQaKDPS8TPhQq6z22bwUVbnB5vvbFNJr6KlZ R/HpPzOucV8QHLFECmyZVHjk1upM+vc0qJJaO5a6uGmdPx//OOtmT6XUmCDqM2DfvLehml dZOHLWW3GT5LPJFWtwqJzqE41QRQXGyzq1mLztznSs2p2mFpKlg5PM+VTT26uZjPxYZCT3 SqqQs4cvZZXEoLTYC1ii8g3WvMKbHgh8acy0jdTVdE63UgOzy23GeYaNER2T+AVnyQLpj3 gwiXtMhIMNi7EZPDO00g+jV7yZTruYUSRTlwAiZOsCZ4Jy4P/LEVYCQlg/1rSA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1777877675; 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=+Y6H4ozIoax04CEITLv7/fggvzkxj+DnDFq4PI2vhNQ=; b=qOelG+TSqEREII/zR2lmD7mfGw3aBzKvHeNXxU5qp/2X7g/1yjTUxkH9DD8uClL63uDAsu VL5VS2MNcGu8XACw== Date: Mon, 04 May 2026 08:54:27 +0200 Subject: [PATCH v2] 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: <20260504-clocksource-update_freq-v2-1-3e696fb01776@linutronix.de> X-B4-Tracking: v=1; b=H4sIAAAAAAAC/4WNWw6CMBBFt0Lm25qh8hC/3IchBstUJpIWp0Awh L1b2YCf5yT33BUCCVOAS7KC0MyBvYugDwmYrnFPUtxGBo26wAwrZXpvXsFPYkhNQ9uMdLdCb5W XGZkyf1RYniGuByHLy16+1ZE7DqOXz340pz/7vzmnKlUac2wI7amo7LVnN43iHS/HlqDetu0L+ FT7zsIAAAA= 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=1777877674; l=3208; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=mOUNKKCNA9pzewF+LBXELXIE98vcEPtVhpGxEBnuZx4=; b=755WyDpneO5ob3c/6RxidsA49V8EkIV8Z8gQVcSB/lBKm8lcJO8psNWeY5MDhAlOcNAcJkE0S iOmPi9dY4wSCsIAtZHD3YlF93HieRwH++Uks687ErU7+ghS6pvngzaP 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 --- Changes in v2: - Rebase on v7.1-rc1 - Pick up Ack from John - Link to v1: https://patch.msgid.link/20260409-clocksource-update_freq-v1-= 1-2050ae0f369f@linutronix.de --- 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 7c38190b10bf..c61aa458d4ec 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h @@ -236,8 +236,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 @@ -258,16 +256,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: 254f49634ee16a731174d2ae34bc50bd5f45e731 change-id: 20260409-clocksource-update_freq-574ec75b9078 Best regards, -- =20 Thomas Wei=C3=9Fschuh