Re: [PATCH 1/6] pm: runtime: Simplify pm_runtime_get_if_active() usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sakari,

kernel test robot noticed the following build errors:

[auto build test ERROR on 3e238417254bfdcc23fe207780b59cbb08656762]

url:    https://github.com/intel-lab-lkp/linux/commits/Sakari-Ailus/pm-runtime-Simplify-pm_runtime_get_if_active-usage/20231116-022051
base:   3e238417254bfdcc23fe207780b59cbb08656762
patch link:    https://lore.kernel.org/r/20231115181840.1509046-2-sakari.ailus%40linux.intel.com
patch subject: [PATCH 1/6] pm: runtime: Simplify pm_runtime_get_if_active() usage
config: i386-buildonly-randconfig-006-20231116 (https://download.01.org/0day-ci/archive/20231116/202311160402.sZooXBaB-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231116/202311160402.sZooXBaB-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311160402.sZooXBaB-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   drivers/gpu/drm/i915/intel_runtime_pm.c: In function '__intel_runtime_pm_get_if_active':
>> drivers/gpu/drm/i915/intel_runtime_pm.c:437:21: error: too many arguments to function '__pm_runtime_get_conditional'
     437 |                 if (__pm_runtime_get_conditional(rpm->kdev, ignore_usecount) <= 0)
         |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/i915/intel_runtime_pm.c:29:
   include/linux/pm_runtime.h:300:19: note: declared here
     300 | static inline int __pm_runtime_get_conditional(struct device *dev)
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/__pm_runtime_get_conditional +437 drivers/gpu/drm/i915/intel_runtime_pm.c

   404	
   405	/**
   406	 * __intel_runtime_pm_get_if_active - grab a runtime pm reference if device is active
   407	 * @rpm: the intel_runtime_pm structure
   408	 * @ignore_usecount: get a ref even if dev->power.usage_count is 0
   409	 *
   410	 * This function grabs a device-level runtime pm reference if the device is
   411	 * already active and ensures that it is powered up. It is illegal to try
   412	 * and access the HW should intel_runtime_pm_get_if_active() report failure.
   413	 *
   414	 * If @ignore_usecount is true, a reference will be acquired even if there is no
   415	 * user requiring the device to be powered up (dev->power.usage_count == 0).
   416	 * If the function returns false in this case then it's guaranteed that the
   417	 * device's runtime suspend hook has been called already or that it will be
   418	 * called (and hence it's also guaranteed that the device's runtime resume
   419	 * hook will be called eventually).
   420	 *
   421	 * Any runtime pm reference obtained by this function must have a symmetric
   422	 * call to intel_runtime_pm_put() to release the reference again.
   423	 *
   424	 * Returns: the wakeref cookie to pass to intel_runtime_pm_put(), evaluates
   425	 * as True if the wakeref was acquired, or False otherwise.
   426	 */
   427	static intel_wakeref_t __intel_runtime_pm_get_if_active(struct intel_runtime_pm *rpm,
   428								bool ignore_usecount)
   429	{
   430		if (IS_ENABLED(CONFIG_PM)) {
   431			/*
   432			 * In cases runtime PM is disabled by the RPM core and we get
   433			 * an -EINVAL return value we are not supposed to call this
   434			 * function, since the power state is undefined. This applies
   435			 * atm to the late/early system suspend/resume handlers.
   436			 */
 > 437			if (__pm_runtime_get_conditional(rpm->kdev, ignore_usecount) <= 0)
   438				return 0;
   439		}
   440	
   441		intel_runtime_pm_acquire(rpm, true);
   442	
   443		return track_intel_runtime_pm_wakeref(rpm);
   444	}
   445	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux