From nobody Tue Apr 7 16:32:14 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 46B863C6A31; Thu, 12 Mar 2026 11:25:39 +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=1773314740; cv=none; b=mB0HfmlbsIe5cum/gS3SY+TXrHT+PRjr3/RDXy4KUUX/EhF6PC82hDBAfZeQGLSllLoqGQ4lgQbV3wsSqPeQp1R01uPrFucwxJSbORKzN6PLbaj6ORJ5jqUZWSRNk2v/wOZWCqWzp1s+O4w8U2Ysb8lXUFMKIb8hzkGBFO+dXhE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773314740; c=relaxed/simple; bh=BfMMtFlyJY/+vTwcg40ilL3DhwoYVAULDU30qp1iOzI=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=R64ui7Rd39YJqaGgPJGOKDXChIkvHA2++Qrg6edumrDSlgNCmZ8soqRr5mfjI15KFBKdDEw4KQfMwF/f9wnvRCPprUtViC2sLaTBZYloi+C1vG9GL3XU9U+MSR78oZaGyJ3n8iB/4mu5azFWD5VB3aGCSeGRHbILA4g1Jske10s= 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=y94Tppea; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=n6aW0kC1; 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="y94Tppea"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="n6aW0kC1" Date: Thu, 12 Mar 2026 11:25:36 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773314738; h=from:from:sender:sender:reply-to: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: in-reply-to:in-reply-to:references:references; bh=B5QSEr4X8KyTGEskuUgcfJ8yeuqRQ8PlAn+jkZjzGAM=; b=y94TppeaV9hfPucdKfdVgUA+k3rlUbKwUICD2TzwhgQ3JNMG9CWc3cgN1ydjS8Sv70BV/c a0lUn6M8XYz582xOyEoxb975xbKXNWP69+kPQsc+g8s4jvJi1lrNmNR+8MBpDNlifZu7zj oEoltu8j39pvWLywkk4eqk9h8XMqek/uErwTp0+Gv0mgVUTM9T8QjVGZBpMbWwDP2lYloy Q9Ra2UDtIHRNcB94uzxwfLplGX1aOcJnFoRVloqJYbleP6aqOiuXybO7ja1/mSjqlrBoeu xnEz9qi1rBEAqyQKjE+eGNjHZOZ387vUCYWI+/8MgGQ3BkCKvqJ6swHdGlWGpQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773314738; h=from:from:sender:sender:reply-to: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: in-reply-to:in-reply-to:references:references; bh=B5QSEr4X8KyTGEskuUgcfJ8yeuqRQ8PlAn+jkZjzGAM=; b=n6aW0kC1JMDTJdlkYv9uL33m0KMtkwkqSJTW47TSjVmRZY2ERDSKimaa+ezCr/yEvv6/0t S+fYaURSvPmGgMCg== From: tip-bot2 for Thomas =?utf-8?q?Wei=C3=9Fschuh_=28Schneider_Electric=29?= Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] timekeeping: Mark offsets array as const Cc: thomas.weissschuh@linutronix.de, Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260311-hrtimer-cleanups-v1-5-095357392669@linutronix.de> References: <20260311-hrtimer-cleanups-v1-5-095357392669@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177331473677.1647592.12931516921949765495.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the timers/core branch of tip: Commit-ID: 112c685f02114d02efe0a14535abcb86fe9e464e Gitweb: https://git.kernel.org/tip/112c685f02114d02efe0a14535abcb86f= e9e464e Author: Thomas Wei=C3=9Fschuh (Schneider Electric) AuthorDate: Wed, 11 Mar 2026 11:15:14 +01:00 Committer: Thomas Gleixner CommitterDate: Thu, 12 Mar 2026 12:15:54 +01:00 timekeeping: Mark offsets array as const Neither the array nor the offsets it is pointing to are meant to be changed through the array. Mark both the array and the values it points to as const. Signed-off-by: Thomas Wei=C3=9Fschuh (Schneider Electric) Signed-off-by: Thomas Gleixner Link: https://patch.msgid.link/20260311-hrtimer-cleanups-v1-5-095357392669@= linutronix.de --- kernel/time/timekeeping.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 46b77c3..27f1742 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -989,7 +989,7 @@ u32 ktime_get_resolution_ns(void) } EXPORT_SYMBOL_GPL(ktime_get_resolution_ns); =20 -static ktime_t *offsets[TK_OFFS_MAX] =3D { +static const ktime_t *const offsets[TK_OFFS_MAX] =3D { [TK_OFFS_REAL] =3D &tk_core.timekeeper.offs_real, [TK_OFFS_BOOT] =3D &tk_core.timekeeper.offs_boot, [TK_OFFS_TAI] =3D &tk_core.timekeeper.offs_tai, @@ -998,8 +998,9 @@ static ktime_t *offsets[TK_OFFS_MAX] =3D { ktime_t ktime_get_with_offset(enum tk_offsets offs) { struct timekeeper *tk =3D &tk_core.timekeeper; + const ktime_t *offset =3D offsets[offs]; unsigned int seq; - ktime_t base, *offset =3D offsets[offs]; + ktime_t base; u64 nsecs; =20 WARN_ON(timekeeping_suspended); @@ -1019,8 +1020,9 @@ EXPORT_SYMBOL_GPL(ktime_get_with_offset); ktime_t ktime_get_coarse_with_offset(enum tk_offsets offs) { struct timekeeper *tk =3D &tk_core.timekeeper; - ktime_t base, *offset =3D offsets[offs]; + const ktime_t *offset =3D offsets[offs]; unsigned int seq; + ktime_t base; u64 nsecs; =20 WARN_ON(timekeeping_suspended); @@ -1043,7 +1045,7 @@ EXPORT_SYMBOL_GPL(ktime_get_coarse_with_offset); */ ktime_t ktime_mono_to_any(ktime_t tmono, enum tk_offsets offs) { - ktime_t *offset =3D offsets[offs]; + const ktime_t *offset =3D offsets[offs]; unsigned int seq; ktime_t tconv; =20