Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1331394lqe; Mon, 8 Apr 2024 06:12:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXuA0kCVRf7zCf5c1H5zstKMQUL9eDYcRu60cv5VwBG4lZWsOhxts75uFkqifVO8zo+nye70at9h65qolDm/V+Dwc+nVVtiLZbRHuZQLQ== X-Google-Smtp-Source: AGHT+IFK1rFqQyjHFfJSKIOKWk6Ylx/8tVzQnusqozFs2FQGG/X5U3GdZ3K/KWGAL52LfR1V15G5 X-Received: by 2002:aa7:88ca:0:b0:6ea:c4b3:10b7 with SMTP id k10-20020aa788ca000000b006eac4b310b7mr12197058pff.17.1712581928439; Mon, 08 Apr 2024 06:12:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712581928; cv=pass; d=google.com; s=arc-20160816; b=0wdEGaGmOss08ToNd1Pa3dRD8YB3dlSXN4aAyKd0fa+Ruq6Gi7FOkNxly+3rIOF2+C YodXsPXs3I4Y+RkJOSVoqkfbdDzGAs4RsQBjwBIfs6EjNZkjl2qRFoy9aALGu9vnD+p3 BfFozbNsZugdrhEAFRDabR5atm9zcfFD1oW0m8yVgauEM/DOkRaSjFSpQ5EVaru3AX0U t+tqMKpf4nyoTrW5mQE5dg0upnS/CzURGQk85d6qeBANBHeePjOtSSkWy2L55mykVr7w gReijEyFrT7UsJ3h4pxfyA86LtOgOK6xoFtzP+lYq1jXt6+XahhAAEUuls8YGV7ZLW3U kAKg== 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=204ZtOTp1RALeXoxS4RBs5bsIWWmf3jQABMdJQY0++0=; fh=HIrP3i0WQwu8zLnKtb1acHgteo695uCSG6Yk5OndRkw=; b=s8LTU3ofV48qoZGUjoNWcDYlVx7P/75q1Io8halN9DGnAB54Fm8qYDaCIxU6qLh5XQ aBeBr4UjBhvZe7U8vQzBIuS2S0os5UBUQimR8m7P9v183tEiKJNR6/p1Cs+o/sUWr0hL pPcEXqQ9KdcWREsqsZVBBOgwCrXMYvScd4m/f/9PZP+0gx+QPeT0KTro326d3KW+1hOg +CG+Ui+b3azyK4fqyrVYvZMHGb+aIcxdYB10Exipz4ciDOB70jn7g/cUWoAUf8BzXpSC ApDPVmqDYwJYM+yO+wqf9QpwM5sSwle2zWLpLKOIa06tjH+wpTgOAEI73wwCH6Kpm/Th 4OqA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=da7LCIbQ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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-135395-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135395-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d4-20020a056a0010c400b006e628dd06efsi2893182pfu.260.2024.04.08.06.12.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 06:12:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-135395-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=da7LCIbQ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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-135395-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135395-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E680028225A for ; Mon, 8 Apr 2024 13:12:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 89DD57E58F; Mon, 8 Apr 2024 13:10:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="da7LCIbQ"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="4AhzBT8V" 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 243C97D07E; Mon, 8 Apr 2024 13:10: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=1712581840; cv=none; b=cgPvXqGmW68PfoGt+xgGaKWmxM1eXxDEGL9J21MBNqFqQrqLTwAsutJcYnEbyn+h8jKqaWf8V73A3o70MOEbw2b/W6TP7V5Lt+bMrtnFp43HHeMxA2R0SD6Kc0PsM1n4tkJLPkk3jU8sTwudSTmwt4kKadrv+W60iLYe1Ae6Tn0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712581840; c=relaxed/simple; bh=kSnLefbdSybkZDE9MP83jDaVt0zb0bg/epwVRbzZSR0=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=tBvU4mhIjO4jWkTQDLkJlSfHZLZkDLUORfFk5hdTtokcrRBFV6KA9OTLyKIpdsDYUctGuWIHrWOWMysz8j4djGPaAJyUFxSzQ6N2m5O4WmHSHT9+QBi3wipDom/ehqWrTCsUY5qRScfJVFEHCcTt689gZlkmGUDaPkUgyQuwzZA= 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=da7LCIbQ; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=4AhzBT8V; 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:36 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1712581837; 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=204ZtOTp1RALeXoxS4RBs5bsIWWmf3jQABMdJQY0++0=; b=da7LCIbQFB9YoQ3ztY6CXNLpEfc6dmHNAJt11/KXyP/pLw50TX0H5HcZ8YzseHONkCpHvc aQ/rol/Nz+waoRaSlWpncs8Rj3FlEl7nZXDL1KPJPpjx1iO/wVdFtyTWl9dB4+jLZ+JPlU KVqrvH6lyt5+/O3ytq5Re1aJ9dS9GjLNhdxK7yu0YvKBzFnMEV8Bu+G6I+UccRTt7B77BL C1++3APa/+hnItLAflYbTrD9KiSF5AFX7TvbgLAlQJCGOlYxDNZ3in9SF+4Cv03skdCHcj B7mA1BY+lHhZxChdJUDGDKp3w3M4FsplIoRpTw6k2CG4RqNPMdLqygt3woADww== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1712581837; 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=204ZtOTp1RALeXoxS4RBs5bsIWWmf3jQABMdJQY0++0=; b=4AhzBT8VVBOnyzCU8Rw3C3ehVqT/d3++aj0wbfyc1DIOnGJSm70x78acInHy9L69/vM7St /iJTbaPFa/CRHrBw== 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: Reuse timekeeping_cycles_to_ns() Cc: Thomas Gleixner , Adrian Hunter , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240325064023.2997-13-adrian.hunter@intel.com> References: <20240325064023.2997-13-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: <171258183651.10875.6600827840164313874.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: 670be12ba8f5d20ee2fb0531be6977005cd62401 Gitweb: https://git.kernel.org/tip/670be12ba8f5d20ee2fb0531be6977005cd62401 Author: Adrian Hunter AuthorDate: Mon, 25 Mar 2024 08:40:16 +02:00 Committer: Thomas Gleixner CommitterDate: Mon, 08 Apr 2024 15:03:07 +02:00 timekeeping: Reuse timekeeping_cycles_to_ns() Simplify __timekeeping_get_ns() by reusing timekeeping_cycles_to_ns(). No functional change. Suggested-by: Thomas Gleixner Signed-off-by: Adrian Hunter Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240325064023.2997-13-adrian.hunter@intel.com --- kernel/time/timekeeping.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index c698219..f81d675 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -391,10 +391,7 @@ static inline u64 timekeeping_cycles_to_ns(const struct tk_read_base *tkr, u64 c static __always_inline u64 __timekeeping_get_ns(const struct tk_read_base *tkr) { - u64 delta, cycles = tk_clock_read(tkr); - - delta = clocksource_delta(cycles, tkr->cycle_last, tkr->mask); - return timekeeping_delta_to_ns(tkr, delta); + return timekeeping_cycles_to_ns(tkr, tk_clock_read(tkr)); } static inline u64 timekeeping_get_ns(const struct tk_read_base *tkr)