Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1898159pxa; Mon, 3 Aug 2020 01:55:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMfwQoVovMAWe7uTh9N2yAIF4o9DHqjK0odNIFI6sMBmglmLz2yEraR+JP5jPeN/9/OUKO X-Received: by 2002:a17:906:3842:: with SMTP id w2mr16117674ejc.273.1596444926602; Mon, 03 Aug 2020 01:55:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596444926; cv=none; d=google.com; s=arc-20160816; b=ZaYTat/efTkobDKwBiYNaxGcy9AzAkfK5XJctRVc1PCkQkwrThLDCpYvS4nBxed6AB qszcialPe39xJOm1vGDfIJ7H9ImnqSbsWcVSdNOeHh29z/NEyaAGJJM2feO6HNuEdxL9 F/vkwGZpv2t/bkVTZ9GQeGdJ8h94eOHQsZQcreO3NaqJiHCUjSAwgaKOEQ3IljqwV8vp ZryABCQVw6nOdIeXatQAnMIUIi/IniwlQ59x+Yi1L8wqYf/aups2tL4ytR9/LcD4Ii6W 7jOpikxzue9gmxAPu9SjTJCKrKqsmTC9kBqWmsslTQvGhSGm8ytPn1Hg/+XaPyxLqTny LElw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=3HeJ0IQYEYe2La9/rrCJazqp0gzCh1XCkZa//Jq9JCA=; b=XKko1WEBGKLsfMAt4lAscsFFX0Vob1fFGDrbfIstaQT9Wp8/LOJ7U87J0FbyoboDcz hM7jHkX/NVIX69tZQhy/qVFu5fbaJRIu0lO1EY4oCH79azmzZNM0Ng1BNwoYDEXWGnxa 6Xyme1HdKLKSJV0IDeQOo4R9s31SIR23NMSqiri97MVW1cLiwlKHCSB8vD/qhpq1QKj3 ciz3oLP9ZtkXHRdf4nTwjjun3ePET95gCz1Z+Vo0h/NcOAeKyPODK4C+zJXLlfcSBCXK bPbv46X19qQZJIids7O/F+iOBu6Pq2vLLSZiccF24x2+xbgA8O7BIVHjkXSJr0ELq0WC g3KA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b1si627134ejb.739.2020.08.03.01.55.04; Mon, 03 Aug 2020 01:55:26 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725968AbgHCIx7 (ORCPT + 99 others); Mon, 3 Aug 2020 04:53:59 -0400 Received: from mga06.intel.com ([134.134.136.31]:62352 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725831AbgHCIxw (ORCPT ); Mon, 3 Aug 2020 04:53:52 -0400 IronPort-SDR: novjd+V0YOHjXUHckk5+BfKgkVLGITwd0aUtORRo7Kf+3fXmGEBe7mFzJ22FDk2cacLleTn+EX KWn7fOsIpTLw== X-IronPort-AV: E=McAfee;i="6000,8403,9701"; a="213601102" X-IronPort-AV: E=Sophos;i="5.75,429,1589266800"; d="scan'208";a="213601102" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Aug 2020 01:53:51 -0700 IronPort-SDR: z0exZezV/kfhY5z1C32Qp1TzeRoohCdwc43nzu0n3hDFu/JiPS7X8oOugCM5Zby8LSNKuDKRlp Gl4a2U/shLjQ== X-IronPort-AV: E=Sophos;i="5.75,429,1589266800"; d="scan'208";a="291977024" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Aug 2020 01:53:50 -0700 Received: by paasikivi.fi.intel.com (Postfix, from userid 1000) id E6B0D206D6; Mon, 3 Aug 2020 11:53:47 +0300 (EEST) Date: Mon, 3 Aug 2020 11:53:47 +0300 From: Sakari Ailus To: "Rafael J. Wysocki" Cc: Linux PM , LKML , Alan Stern , Ulf Hansson , Wolfram Sang Subject: Re: [PATCH] PM: runtime: Add kerneldoc comments to multiple helpers Message-ID: <20200803085347.GV13316@paasikivi.fi.intel.com> References: <2672940.cHDmkauF2A@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2672940.cHDmkauF2A@kreacher> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rafael, Thanks for the patch. On Fri, Jul 31, 2020 at 07:03:26PM +0200, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Add kerneldoc comments to multiple PM-runtime helper functions > defined as static inline wrappers around lower-level routines to > provide quick reference decumentation of their behavior. > > Some of them are similar to each other with subtle differences only > and the behavior of some of them may appear as counter-intuitive, so > clarify all that to avoid confusion. > > Signed-off-by: Rafael J. Wysocki > --- > include/linux/pm_runtime.h | 246 +++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 246 insertions(+) > > Index: linux-pm/include/linux/pm_runtime.h > =================================================================== > --- linux-pm.orig/include/linux/pm_runtime.h > +++ linux-pm/include/linux/pm_runtime.h > @@ -60,58 +60,151 @@ extern void pm_runtime_put_suppliers(str > extern void pm_runtime_new_link(struct device *dev); > extern void pm_runtime_drop_link(struct device *dev); > > +/** > + * pm_runtime_get_if_in_use - Conditionally bump up runtime PM usage counter. > + * @dev: Target device. > + * > + * Increment the runtime PM usage counter of @dev if its runtime PM status is > + * %RPM_ACTIVE and its runtime PM usage counter is greater than 0. The implementation of the non-runtime PM variants (used when CONFIG_PM is disabled) isn't here but I think it'd be nice if their behaviour was also documented here. pm_runtime_get_if_in_use() returns -EINVAL if CONFIG_PM is disabled, for instance. pm_runtime_disable() is defined here but the documentation in corresponding pm_runtime_enable() in drivers/base/power/runtime.c is rather terse. It'd be nice to improve that now (or separately). -- Kind regards, Sakari Ailus