From patchwork Tue Oct 25 13:58:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anna-Maria Behnsen X-Patchwork-Id: 13019277 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE26CC38A2D for ; Tue, 25 Oct 2022 13:59:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230158AbiJYN7b (ORCPT ); Tue, 25 Oct 2022 09:59:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231492AbiJYN7Z (ORCPT ); Tue, 25 Oct 2022 09:59:25 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A17AD18A03B; Tue, 25 Oct 2022 06:59:23 -0700 (PDT) From: Anna-Maria Behnsen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1666706362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=l3DckWoO10WRg2UnQ17gmGvcP+Cj39tE06wtS471Li8=; b=em6zftEaoVI3HcNeSkFX3GvNS7Mq87YKqxPi6jzPuNuMnsd9hOpgXqU7YxHKnOnE0H2Ufu sMMiJ3fP/8URs7IkpEbXMveDREe9Xgh6xeGoiBBECWHhoneW8CwhTfZ7ZfxLHfNyhDZlj2 byidkY6FCvMadm7QpHIlKqV+AjY7oxRV3K72azJSsMGdosRYL5uomyDcy9PeuyAJ93ZXZs SetjXxk2RaAkHdrysvgQd+ms+lQVxFnRIzqoCkh6xwgcvMsyEVqML/rFdUokeLBy2A9x1J uahbz5O8/T4v4H3Ipi+mvXlTfVD0H6r+Gp17i4lkUIKiC2blUUr0Q5p3xhGKtg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1666706362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=l3DckWoO10WRg2UnQ17gmGvcP+Cj39tE06wtS471Li8=; b=vp4yKAYpyd4o5LxaF5jjMGHvfVD89NYnRkiFrZ1e/WQoU6DXiDUEbm31y9dPKO9NE6TBLM vFUfK3nSHkMMU3Dw== To: linux-kernel@vger.kernel.org Cc: Peter Zijlstra , John Stultz , Eric Dumazet , Thomas Gleixner , "Rafael J. Wysocki" , linux-pm@vger.kernel.org, Arjan van de Ven , "Paul E. McKenney" , Frederic Weisbecker , Rik van Riel , Anna-Maria Behnsen Subject: [PATCH v3 03/17] timer: Move store of next event into __next_timer_interrupt() Date: Tue, 25 Oct 2022 15:58:36 +0200 Message-Id: <20221025135850.51044-4-anna-maria@linutronix.de> In-Reply-To: <20221025135850.51044-1-anna-maria@linutronix.de> References: <20221025135850.51044-1-anna-maria@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Both call sides of __next_timer_interrupt() store the return value directly in base->next_expiry. Move the store into __next_timer_interrupt(). No functional change. Signed-off-by: Anna-Maria Behnsen Reviewed-by: Thomas Gleixner --- kernel/time/timer.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/kernel/time/timer.c b/kernel/time/timer.c index 717fcb9fb14a..7695c733dfa5 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c @@ -1571,8 +1571,10 @@ static int next_pending_bucket(struct timer_base *base, unsigned offset, /* * Search the first expiring timer in the various clock levels. Caller must * hold base->lock. + * + * Store next expiry time in base->next_expiry. */ -static unsigned long __next_timer_interrupt(struct timer_base *base) +static void __next_timer_interrupt(struct timer_base *base) { unsigned long clk, next, adj; unsigned lvl, offset = 0; @@ -1638,10 +1640,11 @@ static unsigned long __next_timer_interrupt(struct timer_base *base) clk += adj; } + base->next_expiry = next; base->next_expiry_recalc = false; base->timers_pending = !(next == base->clk + NEXT_TIMER_MAX_DELTA); - return next; + return; } #ifdef CONFIG_NO_HZ_COMMON @@ -1701,7 +1704,7 @@ u64 get_next_timer_interrupt(unsigned long basej, u64 basem) raw_spin_lock(&base->lock); if (base->next_expiry_recalc) - base->next_expiry = __next_timer_interrupt(base); + __next_timer_interrupt(base); nextevt = base->next_expiry; /* @@ -1784,7 +1787,7 @@ static inline void __run_timers(struct timer_base *base) WARN_ON_ONCE(!levels && !base->next_expiry_recalc && base->timers_pending); base->clk++; - base->next_expiry = __next_timer_interrupt(base); + __next_timer_interrupt(base); while (levels--) expire_timers(base, heads + levels);