From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=193.142.43.55 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796057422; b=v7YbpOq2gcsdYPQOJ4nfbG+uXW3GviAVCp2aVjrHlQ1FibaYz/euv+WsC8otgDElk5Qw FllQU7cszihjtUfAvDuv9f2eqOuc0+HOeC47SSl9fACvjdfWAKSvvfUJ2s87Pe4dzEmIt HPSwHBFstCzukgZiVXz3l6tF7CbUkBtfuQxGq5Tx5KPGLTPgjdAOVmEoFv+aerYZ5Ytn5 Ouim96m36BU++/K5WV+zyHiSnxeCvJibfM3rD6RE5iC1flCzUoeJgSKaTW7ZDC0vFtbFB zzbzoZhfnd/JJO00OWgTrV5vCQ5qPn2ltMbumNge8CT9PCJvluJ7hBZQZ1MbcqMqNCw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796057422; h=DMARC-Filter:From:DKIM-Signature:DKIM-Signature:Date:Subject: MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id: References:In-Reply-To:To:Cc:X-Developer-Signature:X-Developer-Key; bh=YBtC14thedBfyNdngDNYANoFPWdC9Yx3iHJemzIvbno=; b=fr0KWCcv7FypxqNZZisUvswyBMYA3vBQ0x6Txb1J9FldLRZReLZ4nnf4sm4otTYbGNo6 zi89M1NnA4t+cOPCz4HLExP3oWvbGTT87Piaa0OOL9QLPlkqwuUUXJgT5xAKJ73pqxNUC GkZJwcdIJZaLhl7FRuVqWtkTyPhDyhdUt3yna18jIHU1Bz2NOszkSskwowUp6a3rQA4m2 gPUfCqxyDjEYPHGPmXyHA/6v71wrxXb21pnDskKg/LapJ98AEa7KGXV/7lOZrJ0Ao0vsZ RWbheFhOfhUh3OdWro9DPSomJjJCuZB81CzJeJj7aKqLElrgjMzBc2BMZJIGNuMQMJQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=2S+pFyv6; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=P4AOuJxn; arc=none smtp.remote-ip=193.142.43.55 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 622AD606A31C for ; Mon, 30 Nov 2026 16:50:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 622AD606A31C 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.a=rsa-sha256 header.s=2020 header.b=2S+pFyv6; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=P4AOuJxn From: =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1796057419; 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: in-reply-to:in-reply-to:references:references; bh=YBtC14thedBfyNdngDNYANoFPWdC9Yx3iHJemzIvbno=; b=2S+pFyv6fmmcyChGHtCLl7TgXLf1cH2bDxW1k0xEovFCb/v1UvjVVQzB6XAsZL0DTcxyE8 6CRqWgEvx/UWjQoGfB7cqExttTuPBUgFpeKVopi6R6LgTDvmhki/RkZbqCWsQgqH/HeA5G eIGkPp/o0AnCc5TxKegRd/jQ6gjax3PyViPCkwLoYEwcnQZCN/PR85JOle4O0C1t0doU91 CsmiR88NOWiAzXrSdow1YC4zsEeSwhdOaNJjbuT5ZiLV/pcU1rhXB2Eq1fEShRhlObLmXl zJKNNDMg5rLU1yHu4kv6Yz4wOa/FZ3qES00JCh3Wpi56dkdwenWptSq+U1vinQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1796057419; 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: in-reply-to:in-reply-to:references:references; bh=YBtC14thedBfyNdngDNYANoFPWdC9Yx3iHJemzIvbno=; b=P4AOuJxnahtXzegSJQM3g7546DxK9STFSV5b4aZRsHTKgzyb6AzYbW1lMWdKMitSMWMCc/ xWht6hRlOpnPkTCA== Date: Mon, 30 Nov 2026 17:50:02 +0100 Subject: [PATCH v3 3/4] timekeeping: Remove the unnecessary tk_is_aux() X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20261130-timekeeping-conditionals-v3-3-3f95edbfec4d@linutronix.de> References: <20261130-timekeeping-conditionals-v3-0-3f95edbfec4d@linutronix.de> In-Reply-To: <20261130-timekeeping-conditionals-v3-0-3f95edbfec4d@linutronix.de> To: John Stultz , Thomas Gleixner , Stephen Boyd , Miroslav Lichvar Cc: linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1796057406; l=1637; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=RrIaOU+wTDrw6r3AT3PBPZKxpXigor0ehuzY++RLqg8=; b=y8ovYft1K+KdQ1AQ4o1j3J2v7x7vQR1YvJSk8rqfzzYNERpZt617xvjl3vONyTdhk1javm207 HDbU/ms1jeICvTY0Vu8FvKUitXlfDNgQ79OSUizcLbDnaqVlPlBT9W4 X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= Any timekeeper which is not the core timekeeper is already known to be an auxiliary one. There is no need for an additional conditional. Remove the 'else if' and the now unused tk_is_aux(). Signed-off-by: Thomas Weißschuh (Schneider Electric) --- kernel/time/timekeeping.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 9d304a998758..601f21865622 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -66,10 +66,6 @@ static inline bool tk_get_aux_ts64(unsigned int tkid, struct timespec64 *ts) return ktime_get_aux_ts64(CLOCK_AUX + tkid - TIMEKEEPER_AUX_FIRST, ts); } -static inline bool tk_is_aux(const struct timekeeper *tk) -{ - return tk->id >= TIMEKEEPER_AUX_FIRST && tk->id <= TIMEKEEPER_AUX_LAST; -} static inline struct tk_data *aux_get_tk_data(clockid_t id); #else static inline bool tk_get_aux_ts64(unsigned int tkid, struct timespec64 *ts) @@ -77,10 +73,6 @@ static inline bool tk_get_aux_ts64(unsigned int tkid, struct timespec64 *ts) return false; } -static inline bool tk_is_aux(const struct timekeeper *tk) -{ - return false; -} static inline struct tk_data *aux_get_tk_data(clockid_t id) { return NULL; @@ -852,7 +844,7 @@ static void timekeeping_update_from_shadow(struct tk_data *tkd, unsigned int act update_fast_timekeeper(&tk->tkr_mono, &tk_fast_mono); update_fast_timekeeper(&tk->tkr_raw, &tk_fast_raw); - } else if (tk_is_aux(tk)) { + } else { vdso_time_update_aux(tk); } -- 2.56.1