Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3797712pxf; Mon, 29 Mar 2021 11:41:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdZcv1yn0GK07+aGzudpH9NzImJr3Rn9WzQcL0Qha7hdyad0hbuUmyitoNUi9MK17FiIJU X-Received: by 2002:a05:6402:c8:: with SMTP id i8mr30237423edu.57.1617043277185; Mon, 29 Mar 2021 11:41:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617043277; cv=none; d=google.com; s=arc-20160816; b=Z4Vzv/dioIVRpFFEb0i8YcuzTKkr5C4jp0re2XPjIL/3ABsBcgsQj7E2Ynp6AhlaOo e6gqNTRXRr22M2FQ7Y7G3PhsCpq9gjoFVoGDPScDkZZ1jIng/WWFODOeBAuARcM3y46E J2hZirVc4TfKBkGWjQNKbxvgKBAVfIh58WAGjPdZfsxwLoUImM4GyMQlEZ1oaBUs+auj 5xILD2uI86aj+WSzFXiNTjnpaLGM2I1C1RPHnNN0JjCEA5IF/6QdhSITK8KOOxpJ2dP2 XTsS+Jz1U7k1WFT7M1CWxQfgEidJzRhk865aXn3whmxSh8nN9JQL2ac1K00zAonFIVKW R0rQ== 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=KsWNJcELfbkXuPcTJozLsKDV8N/0ssbQgpdhQeY2Nwke1h1fYe0oVteRpKjzjb6Th2 XiTTnJvjrdWRwat6dv21bHQAJeiKsZJYZmYGj+ug6UoMNQHRNnhJ31DbQe5x2qzS0z1y 4eMUgBHbnZJjMUoQw6qXbE346HuL1CPo7KSSn3P+GCR9YjO4t64YlPCrddy5tq/QojW0 r+VORLXbl1lXOcSEBt15ozZ9bWCxbc2xe0i7v6kC9YRhCkqqyKbC7vFarHA2augacdBc 9IpL8XknlsxFHi76Cvl4jCZrSiWK3qpTrpkUo7cX3i9KW0jz1qz3O0vgXdio8uNQL25Y 7kYQ== 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 u27si13383488ejj.726.2021.03.29.11.40.54; Mon, 29 Mar 2021 11:41:17 -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 S231672AbhC2SiP (ORCPT + 99 others); Mon, 29 Mar 2021 14:38:15 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:49558 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231420AbhC2Shk (ORCPT ); Mon, 29 Mar 2021 14:37:40 -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 17164c673aa7a8a9; Mon, 29 Mar 2021 20:37:39 +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 42CF7669165; Mon, 29 Mar 2021 20:37:38 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux PM Cc: LKML , Frederic Weisbecker , Peter Zijlstra , Thomas Gleixner , "Zhou Ti (x2019cwm)" Subject: [PATCH v1 1/5] tick/nohz: Improve tick_nohz_get_next_hrtimer() kerneldoc Date: Mon, 29 Mar 2021 20:13:37 +0200 Message-ID: <3104403.44csPzL39Z@kreacher> In-Reply-To: <2764850.e9J7NaK4W3@kreacher> References: <2764850.e9J7NaK4W3@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduledrudehkedguddvlecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdejlefghfeiudektdelkeekvddugfeghffggeejgfeukeejleevgffgvdeluddtnecukfhppeekledrieegrdekuddrudefudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeekledrieegrdekuddrudefuddphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehfrhgvuggvrhhitgeskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepphgvthgvrhiisehinhhfrhgruggvrggurdhorhhgpdhrtghpthhtohepthhglhigsehlihhnuhhtrhhonhhigidruggvpdhrtghp thhtohepgidvtddulegtfihmsehsthhfgidrtggr X-DCC--Metrics: v370.home.net.pl 1024; Body=6 Fuz1=6 Fuz2=6 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) {