From: kernel test robot <lkp@intel.com>
To: Sasha Levin <sashal@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [sashal-stable:pending-5.4 68/89] drivers/base/power/runtime.c:1152: warning: Function parameter or member 'ign_usage_count' not described in 'pm_runtime_get_if_active'
Date: Thu, 17 Aug 2023 20:24:15 +0800 [thread overview]
Message-ID: <202308172029.mesaR827-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git pending-5.4
head: 526800c1cc4597346abc427d878f6e15bd0a4429
commit: b32fc94a27815cdd8b1a637880d6bb398288ddff [68/89] PM: runtime: Add pm_runtime_get_if_active()
config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20230817/202308172029.mesaR827-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230817/202308172029.mesaR827-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308172029.mesaR827-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/base/power/runtime.c:347: warning: Excess function parameter 'dev' description in '__rpm_callback'
drivers/base/power/runtime.c:973: warning: Function parameter or member 'timer' not described in 'pm_suspend_timer_fn'
drivers/base/power/runtime.c:973: warning: Excess function parameter 'data' description in 'pm_suspend_timer_fn'
>> drivers/base/power/runtime.c:1152: warning: Function parameter or member 'ign_usage_count' not described in 'pm_runtime_get_if_active'
vim +1152 drivers/base/power/runtime.c
5e928f77a09a07 Rafael J. Wysocki 2009-08-18 1130
a436b6a19f5765 Rafael J. Wysocki 2015-12-17 1131 /**
b32fc94a27815c Sakari Ailus 2020-02-25 1132 * pm_runtime_get_if_active - Conditionally bump up the device's usage counter.
a436b6a19f5765 Rafael J. Wysocki 2015-12-17 1133 * @dev: Device to handle.
a436b6a19f5765 Rafael J. Wysocki 2015-12-17 1134 *
a436b6a19f5765 Rafael J. Wysocki 2015-12-17 1135 * Return -EINVAL if runtime PM is disabled for the device.
a436b6a19f5765 Rafael J. Wysocki 2015-12-17 1136 *
b32fc94a27815c Sakari Ailus 2020-02-25 1137 * Otherwise, if the device's runtime PM status is RPM_ACTIVE and either
b32fc94a27815c Sakari Ailus 2020-02-25 1138 * ign_usage_count is true or the device's usage_count is non-zero, increment
b32fc94a27815c Sakari Ailus 2020-02-25 1139 * the counter and return 1. Otherwise return 0 without changing the counter.
b32fc94a27815c Sakari Ailus 2020-02-25 1140 *
b32fc94a27815c Sakari Ailus 2020-02-25 1141 * If ign_usage_count is true, the function can be used to prevent suspending
b32fc94a27815c Sakari Ailus 2020-02-25 1142 * the device when its runtime PM status is RPM_ACTIVE.
b32fc94a27815c Sakari Ailus 2020-02-25 1143 *
b32fc94a27815c Sakari Ailus 2020-02-25 1144 * If ign_usage_count is false, the function can be used to prevent suspending
b32fc94a27815c Sakari Ailus 2020-02-25 1145 * the device when both its runtime PM status is RPM_ACTIVE and its usage_count
b32fc94a27815c Sakari Ailus 2020-02-25 1146 * is non-zero.
b32fc94a27815c Sakari Ailus 2020-02-25 1147 *
b32fc94a27815c Sakari Ailus 2020-02-25 1148 * The caller is resposible for putting the device's usage count when ther
b32fc94a27815c Sakari Ailus 2020-02-25 1149 * return value is greater than zero.
a436b6a19f5765 Rafael J. Wysocki 2015-12-17 1150 */
b32fc94a27815c Sakari Ailus 2020-02-25 1151 int pm_runtime_get_if_active(struct device *dev, bool ign_usage_count)
a436b6a19f5765 Rafael J. Wysocki 2015-12-17 @1152 {
a436b6a19f5765 Rafael J. Wysocki 2015-12-17 1153 unsigned long flags;
a436b6a19f5765 Rafael J. Wysocki 2015-12-17 1154 int retval;
a436b6a19f5765 Rafael J. Wysocki 2015-12-17 1155
a436b6a19f5765 Rafael J. Wysocki 2015-12-17 1156 spin_lock_irqsave(&dev->power.lock, flags);
b32fc94a27815c Sakari Ailus 2020-02-25 1157 if (dev->power.disable_depth > 0) {
b32fc94a27815c Sakari Ailus 2020-02-25 1158 retval = -EINVAL;
b32fc94a27815c Sakari Ailus 2020-02-25 1159 } else if (dev->power.runtime_status != RPM_ACTIVE) {
b32fc94a27815c Sakari Ailus 2020-02-25 1160 retval = 0;
b32fc94a27815c Sakari Ailus 2020-02-25 1161 } else if (ign_usage_count) {
b32fc94a27815c Sakari Ailus 2020-02-25 1162 retval = 1;
b32fc94a27815c Sakari Ailus 2020-02-25 1163 atomic_inc(&dev->power.usage_count);
b32fc94a27815c Sakari Ailus 2020-02-25 1164 } else {
b32fc94a27815c Sakari Ailus 2020-02-25 1165 retval = atomic_inc_not_zero(&dev->power.usage_count);
b32fc94a27815c Sakari Ailus 2020-02-25 1166 }
ec16798e9085aa Michał Mirosław 2020-01-04 1167 trace_rpm_usage_rcuidle(dev, 0);
a436b6a19f5765 Rafael J. Wysocki 2015-12-17 1168 spin_unlock_irqrestore(&dev->power.lock, flags);
b32fc94a27815c Sakari Ailus 2020-02-25 1169
a436b6a19f5765 Rafael J. Wysocki 2015-12-17 1170 return retval;
a436b6a19f5765 Rafael J. Wysocki 2015-12-17 1171 }
b32fc94a27815c Sakari Ailus 2020-02-25 1172 EXPORT_SYMBOL_GPL(pm_runtime_get_if_active);
a436b6a19f5765 Rafael J. Wysocki 2015-12-17 1173
:::::: The code at line 1152 was first introduced by commit
:::::: a436b6a19f57656a6557439523923d89eb4a880d PM / runtime: Add new helper for conditional usage count incrementation
:::::: TO: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
:::::: CC: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-08-17 12:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202308172029.mesaR827-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=sashal@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.