Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1331567lqe; Mon, 8 Apr 2024 06:12:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX09hwaS1ChuZWakWfvhVsfb9NorobLwZVKe60Lma9rVsBzKVF5rhpqJyxteLbXRiCnkiCL9mzqR9ZX3FzzyI6Z4CNac8Am0z6eWSJkwQ== X-Google-Smtp-Source: AGHT+IHnEx8zFlnJdG0u4j/Am/GldINVt44mxATIIxmJ560ONDZ7Mw7UHs16ZcZdIguA1XawIFs9 X-Received: by 2002:a05:6402:3881:b0:56d:c77b:4f0c with SMTP id fd1-20020a056402388100b0056dc77b4f0cmr8375728edb.2.1712581941608; Mon, 08 Apr 2024 06:12:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712581941; cv=pass; d=google.com; s=arc-20160816; b=ANkvv1dvNjebheLX6np4+Tbz+j/IhSorRVfbFYAynKqrnFOfyzVwfO11zWdMrv3deX +kRaPIB4+fRxVqs7UbRjJMZTqFi7EkZDWR1NQjxm8sy2dXucJnyVpvyPhPywwYzHT2gj eE9rhHrWn5oTEI+5T1pGzC0tyMfxgRoDCAJTG4EKVRJe0nAx968W1Yz5YwmXRBNLiEWB F8G6ZgCc55lIMM+/IMm5SJOQWBQn6CHn4pzOntTXrQw+45HnAbEsmcj1Bs8q3T61FkaS H7W9ek2tbl4LoyOcE3h9TBlQgtokJdqu5oBS8YYWEqyAi0fkp4ADWtgQT3Lzqj6voK16 JncA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=uSQlc40Xhzc0Q5Xm3VZYWKci9+yMgajPnTVQ4nYWqdw=; fh=HIrP3i0WQwu8zLnKtb1acHgteo695uCSG6Yk5OndRkw=; b=c1PpUzT4R4Fzs2oWlOVr/dzokrpwhPAn2W0sxCXflUdelKLHlVcnmTlFlbVLUlwwEo ACCa9ZJBBsb92YAaTO75SrtVAxUsyD5sUyiLVEI+TTWJe4HctRucMf8xgpaMvgk+lfhy 8Vfq/PVzv2NisULFE6ApT7guU+77hnrFDrLP9ajfEKGynlMZKcX8V4eJU6BuE+r0aoqg 4K45we7qhgIR1YuBecGSIFXNXor9qK5Juq1Hz8i0Hk0nvdjymuajmqHlPcDhcupGD/Yi gmtJ6qDQ6ZPuFhiNHGMUCA7nqMBtfIwoG38kHFA+z8v+m2g0/zRIeCcJos19oygsgbl4 ikgg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="ibDjSMA/"; dkim=neutral (no key) header.i=@linutronix.de; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-135396-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135396-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id v5-20020a509545000000b0056e12cf74dasi3615424eda.254.2024.04.08.06.12.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 06:12:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-135396-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="ibDjSMA/"; dkim=neutral (no key) header.i=@linutronix.de; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-135396-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135396-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 58D4A1F21C1B for ; Mon, 8 Apr 2024 13:12:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3D0CF7EEF0; Mon, 8 Apr 2024 13:10:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ibDjSMA/"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="421ueKpJ" 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 D88907D3F8; Mon, 8 Apr 2024 13:10: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=1712581841; cv=none; b=DedyiUrZh7c2xkVlxZgMfcVeoKkxUUE7GMGDGhBKz7Ue9TQkyNVbA06EwsiBHMelH90bI7Qd7+ltFoA4LiI8S6PAvsoSlZ/DWA9EwPXXu1FCnBTlQSlalnlZCiSLGCcnNwlzynAuUaEKX/jAr0ThVRCZ+P3WIf2ViaACBmHCHqc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712581841; c=relaxed/simple; bh=Pi880dGBhxu7vJl2+RrVrYbf2Fl06alPAw4yJ/1n5NY=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=q65CcHj2uZODBPbfscYiL5FSC9eoZc3arJzGm8dEOZC3JQqVz0pTFRo5djR9D4aqzPORQUQ6A6FrTy8XnClObXUeV/lXjsudaf6CQAqR+16rnMuiolII2sWbdgq4MzYH64Ziy83GI1upu/sWovQ5mMP5qZUQA0hRm+6Um8/4AF8= 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=ibDjSMA/; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=421ueKpJ; 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 Date: Mon, 08 Apr 2024 13:10:37 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1712581838; 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=uSQlc40Xhzc0Q5Xm3VZYWKci9+yMgajPnTVQ4nYWqdw=; b=ibDjSMA/XsJ4yONWuXR/6fT5EAgkGJK9jVoabDLHpNhgTMyehlgOZXix7P/aDseyseC4BZ VJoMUH7mzIQ3D3yb30FUnT7R5lOFxaiTjQ822Eq6BIHW56kjd3RVt7QBRZbVvICIdslUFR ZExVlQW8fm2/IIUKZW3R0BLQ1bdk5MBRB6uG/txuPZ0fFq15xLqNgBGnnoJJEPhTGkWJ6z c8fStS69mcT4Dx5zvXETj+LIV+ZmVzHqVjvU4KjjBKN4gKw5+QaezjFC3ICYhtY3DHwWRO eDkFqwrUffgiHDQVEmtzsLEyATO6P1nt691Ca0l/4iz7oF7yNwjHYDTEFna5vg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1712581838; 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=uSQlc40Xhzc0Q5Xm3VZYWKci9+yMgajPnTVQ4nYWqdw=; b=421ueKpJhCvNo4QsdVjcUCg8Y4hdkDXpBlG3x7JG2OwBhQL67vTRHtDrPR1AdKg2homJsd DmKowmxMbrZbF0Bg== From: "tip-bot2 for Adrian Hunter" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] timekeeping: Tidy timekeeping_cycles_to_ns() slightly Cc: Thomas Gleixner , Adrian Hunter , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240325064023.2997-12-adrian.hunter@intel.com> References: <20240325064023.2997-12-adrian.hunter@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <171258183726.10875.5466675565970105553.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: 7bit The following commit has been merged into the timers/core branch of tip: Commit-ID: 9af4548e828aa2ea66f54433c5747f64124a6240 Gitweb: https://git.kernel.org/tip/9af4548e828aa2ea66f54433c5747f64124a6240 Author: Adrian Hunter AuthorDate: Mon, 25 Mar 2024 08:40:15 +02:00 Committer: Thomas Gleixner CommitterDate: Mon, 08 Apr 2024 15:03:07 +02:00 timekeeping: Tidy timekeeping_cycles_to_ns() slightly Put together declaration and initialization of the local variable 'delta'. Suggested-by: Thomas Gleixner Signed-off-by: Adrian Hunter Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240325064023.2997-12-adrian.hunter@intel.com --- kernel/time/timekeeping.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 6306133..c698219 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -383,10 +383,9 @@ static inline u64 timekeeping_delta_to_ns(const struct tk_read_base *tkr, u64 de static inline u64 timekeeping_cycles_to_ns(const struct tk_read_base *tkr, u64 cycles) { - u64 delta; + /* Calculate the delta since the last update_wall_time() */ + u64 delta = clocksource_delta(cycles, tkr->cycle_last, tkr->mask); - /* calculate the delta since the last update_wall_time */ - delta = clocksource_delta(cycles, tkr->cycle_last, tkr->mask); return timekeeping_delta_to_ns(tkr, delta); }