Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp216090pxa; Fri, 31 Jul 2020 10:06:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxo82tM770oKrdH18cFTe17kiEgOtJpBNkqmeUO+y13VdVYuBAcX5Tdf7ieGrrFOFuSYRZe X-Received: by 2002:a17:906:12cd:: with SMTP id l13mr4856480ejb.385.1596215217511; Fri, 31 Jul 2020 10:06:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596215217; cv=none; d=google.com; s=arc-20160816; b=bPCiCnQn6BZPR64VZCAaaYI+sOgTLQR4GOtQgbkiEeelnRM0RURCU70tkvCHjBmoyS nPcaiVIWZpJnTnZQbaxeL3n96GWEGDogT/qT0Ls1m83zyzHj3SlWMtZx0hmwvpW7I48e PVX21gPsIwpd6jSxq2s+wyzBtCvbOYev0ENhJmE32at+gV8H/B/QfwbPaS0/jUxjMvtc 4QPqdjYSXXYAgUYS01flQajqbqAStTs03A3uxclCURos8XCnGkoMKWQJTVHiFpuvUVRF jJDasHJ78/KthxqUNAUQbe3aZg0VSsxA2luctxZS+DC/GP9kZhKH0IzJC5iid8I1MkiV LZbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=01ebHZOpZ4DpgFYf8st0zUULkSflsd2OGjN6x9YqSi0=; b=GaqmCh7/UK/l5ORdFsQFoGcmx9NkIZ0egcPulnSAOyRP7T5kGZxRlhVuTi+hBEYhDn IG9wDT/8CRooapIOeR8TOMI3enFruYvjcnrBI0AEbbvLw+Ez0KhL2pUZwdJwzbi1BTHL PfdYs0aRZidEmJHjCgvhKHAUOMHOsP3azgn/Rl6zFWPE40OdhPNaukjUzROwSPjF6yCO AwlJX/k+pVgX3asWUKXOweOiU2Zi6JLETAeZI+32wpdbQs40QFmdUof7rJOguhU2OHzq kZdPIJDiTIrO7XMdqIN5oDSftOXTCOW19H2IVsCGaJrIiQpG0y9U3fUsGsnbSxABXzcQ NuIA== 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 lt11si5418220ejb.436.2020.07.31.10.06.35; Fri, 31 Jul 2020 10:06:57 -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 S1732761AbgGaREO (ORCPT + 99 others); Fri, 31 Jul 2020 13:04:14 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:51998 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728958AbgGaREO (ORCPT ); Fri, 31 Jul 2020 13:04:14 -0400 Received: from 89-64-88-186.dynamic.chello.pl (89.64.88.186) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.415) id ef737f88fc7984ef; Fri, 31 Jul 2020 19:04:12 +0200 From: "Rafael J. Wysocki" To: Linux PM Cc: LKML , Sakari Ailus Subject: [PATCH] PM: runtime: Improve kerneldoc of pm_runtime_get_if_active() Date: Fri, 31 Jul 2020 19:04:11 +0200 Message-ID: <3777183.7rZhd9hnLu@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki The kerneldoc comment of pm_runtime_get_if_active() doesn't list the second argument of the function properly, so fix that and while at it clarify that comment somewhat and add some markup to it. Signed-off-by: Rafael J. Wysocki --- drivers/base/power/runtime.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) Index: linux-pm/drivers/base/power/runtime.c =================================================================== --- linux-pm.orig/drivers/base/power/runtime.c +++ linux-pm/drivers/base/power/runtime.c @@ -1085,24 +1085,26 @@ int __pm_runtime_resume(struct device *d EXPORT_SYMBOL_GPL(__pm_runtime_resume); /** - * pm_runtime_get_if_active - Conditionally bump up the device's usage counter. + * pm_runtime_get_if_active - Conditionally bump up device usage counter. * @dev: Device to handle. + * @ign_usage_count: Whether or not to look at the current usage counter value. * - * Return -EINVAL if runtime PM is disabled for the device. + * Return -EINVAL if runtime PM is disabled for @dev. * - * Otherwise, if the device's runtime PM status is RPM_ACTIVE and either - * ign_usage_count is true or the device's usage_count is non-zero, increment - * the counter and return 1. Otherwise return 0 without changing the counter. + * Otherwise, if the runtime PM status of @dev is %RPM_ACTIVE and either + * @ign_usage_count is %true or the runtime PM usage counter of @dev is not + * zero, increment the usage counter of @dev and return 1. Otherwise, return 0 + * without changing the usage counter. * - * If ign_usage_count is true, the function can be used to prevent suspending - * the device when its runtime PM status is RPM_ACTIVE. + * If @ign_usage_count is %true, this function can be used to prevent suspending + * the device when its runtime PM status is %RPM_ACTIVE. * - * If ign_usage_count is false, the function can be used to prevent suspending - * the device when both its runtime PM status is RPM_ACTIVE and its usage_count - * is non-zero. + * If @ign_usage_count is %false, this function can be used to prevent + * suspending the device when both its runtime PM status is %RPM_ACTIVE and its + * runtime PM usage counter is not zero. * - * The caller is resposible for putting the device's usage count when ther - * return value is greater than zero. + * The caller is resposible for decrementing the runtime PM usage counter of + * @dev after this function has returned a positive value for it. */ int pm_runtime_get_if_active(struct device *dev, bool ign_usage_count) {