Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3797177pxf; Mon, 29 Mar 2021 11:40:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCijsdK2IzbdwSob5MXAEi3V3jGjSvwsyZi59qPzQGPuwwBDXnJeO56+1uKKy+Aetj6BVZ X-Received: by 2002:a17:907:1b20:: with SMTP id mp32mr29742428ejc.495.1617043218401; Mon, 29 Mar 2021 11:40:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617043218; cv=none; d=google.com; s=arc-20160816; b=qN26XvqX9cJSsVvqDnG5GPYonVSoefdujtU0M/fVrYJ3YuVZMPNS5PzXrFDkP9ahqH nh6Zy8DMRbTIGt5a+d2kZEKxmQaK/65q2fqxZpv/MyZCW80BbkgRcHpqh9IM+E3yrklL kaIVX93EzZvMWQAND74qo3rB5no4OAdnEXRWd7kmoxRikFMHcD1xCn04iKmg45eVaiHh zgPphnTYA3nFPDgkzhdBWB2SIcbfTLIxqFG8UkwepNjrxU7HdggTs7MpJK4z3pBtsi7S 9gMAVl4Jy/L3YwuHaxAOLfxOdSMAv9yRiuY/e3m+KIPk4k9bakOvkSU4EUidN/4rablc GgKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=/a0Vect5myF8G/9xLyS93Gc/R62ePj46E4fS8xGplX8=; b=Dp0MHr70Yp2zjq9diiybAH7XfSJC2ME8a2H2rNAfB1olZTlcbeaHUDtu7QU19xXdBc W769zKOWi35zYI269StZKrvyGOAXujo+zv7mKzB4ljjMC8u4RTeDaG+q7+65kSqjOChG 8Bh/QaD/T67ODZjQQboTx3cQ2Rc9/xjb7E3PrgrhJ4hogzlsFVY0naany7NrNDx1E3Zd enbMOEltuB4pQ5gmkKPenHCGZLTndG25OjRSMCvfv5QwtiurZTg5+boPx4QqojuxrVBC LXgNsDnzWVdGn2lbxI6Yx+t26KTFjCeWxoWHUdfE5kXeuXON8JDGicq2mXu237Y81DkC l7Ow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b13si13694563eja.326.2021.03.29.11.39.54; Mon, 29 Mar 2021 11:40:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231703AbhC2SiS (ORCPT + 99 others); Mon, 29 Mar 2021 14:38:18 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:55068 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231555AbhC2Shp (ORCPT ); Mon, 29 Mar 2021 14:37:45 -0400 Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 2.0.3) id bd3a92e6c8355cdb; Mon, 29 Mar 2021 20:37:43 +0200 Received: from kreacher.localnet (89-64-81-131.dynamic.chello.pl [89.64.81.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 4091E669165; Mon, 29 Mar 2021 20:37:42 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux PM Cc: LKML , Frederic Weisbecker , Peter Zijlstra , Thomas Gleixner , "Zhou Ti (x2019cwm)" Subject: [RFC][PATCH 1/5] tick/nohz: Improve tick_nohz_get_next_hrtimer() kerneldoc Date: Mon, 29 Mar 2021 20:11:49 +0200 Message-ID: <1775695.tdWV9SEqCh@kreacher> In-Reply-To: <2188825.ElGaqSPkdT@kreacher> References: <2188825.ElGaqSPkdT@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduledrudehkedguddvlecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdejlefghfeiudektdelkeekvddugfeghffggeejgfeukeejleevgffgvdeluddtnecukfhppeekledrieegrdekuddrudefudenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepihhnvghtpeekledrieegrdekuddrudefuddphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehfrhgvuggvrhhitgeskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepphgvthgvrhiisehinhhfrhgruggvrggurdhorhhgpdhrtghpthhtohepthhglhigsehlihhnuhhtrhhonhhigidruggvpdhrtghp thhtohepgidvtddulegtfihmsehsthhfgidrtggr X-DCC--Metrics: v370.home.net.pl 1024; Body=13 Fuz1=13 Fuz2=13 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Rafael J. Wysocki" Make the tick_nohz_get_next_hrtimer() kerneldoc comment state clearly that the function may return negative numbers. Signed-off-by: Rafael J. Wysocki --- kernel/time/tick-sched.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) Index: linux-pm/kernel/time/tick-sched.c =================================================================== --- linux-pm.orig/kernel/time/tick-sched.c +++ linux-pm/kernel/time/tick-sched.c @@ -1124,7 +1124,11 @@ ktime_t tick_nohz_get_next_hrtimer(void) * tick_nohz_get_sleep_length - return the expected length of the current sleep * @delta_next: duration until the next event if the tick cannot be stopped * - * Called from power state control code with interrupts disabled + * Called from power state control code with interrupts disabled. + * + * The return value of this function and/or the value returned by it through the + * @delta_next pointer can be negative which must be taken into account by its + * callers. */ ktime_t tick_nohz_get_sleep_length(ktime_t *delta_next) {