[pm:bleeding-edge 126/127] drivers/base/power/domain.c:2434:47: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
head:   34ae5d53ec5963e3f2967fcd12bae44decbfc4c0
commit: 07cebb5e726d519b7de0373ade62465c2ebdd355 [126/127] PM / domains: Return 0 on error from of_genpd_opp_to_performance_state()
config: x86_64-randconfig-x019-201820 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        git checkout 07cebb5e726d519b7de0373ade62465c2ebdd355
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   drivers/base/power/domain.c: In function 'of_genpd_opp_to_performance_state':
>> drivers/base/power/domain.c:2434:47: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=]
      dev_err(dev, "Failed to find required OPP: %d\n", PTR_ERR(opp));
                                                 ~^     ~~~~~~~~~~~~
                                                 %ld

vim +2434 drivers/base/power/domain.c

  2399	
  2400	/**
  2401	 * of_genpd_opp_to_performance_state- Gets performance state of device's
  2402	 * power domain corresponding to a DT node's "required-opps" property.
  2403	 *
  2404	 * @dev: Device for which the performance-state needs to be found.
  2405	 * @opp_node: DT node where the "required-opps" property is present. This can be
  2406	 *	the device node itself (if it doesn't have an OPP table) or a node
  2407	 *	within the OPP table of a device (if device has an OPP table).
  2408	 * @state: Pointer to return performance state.
  2409	 *
  2410	 * Returns performance state corresponding to the "required-opps" property of
  2411	 * a DT node. This calls platform specific genpd->opp_to_performance_state()
  2412	 * callback to translate power domain OPP to performance state.
  2413	 *
  2414	 * Returns performance state on success and 0 on failure.
  2415	 */
  2416	unsigned int of_genpd_opp_to_performance_state(struct device *dev,
  2417						       struct device_node *opp_node)
  2418	{
  2419		struct generic_pm_domain *genpd;
  2420		struct dev_pm_opp *opp;
  2421		int state = 0;
  2422	
  2423		genpd = dev_to_genpd(dev);
  2424		if (IS_ERR(genpd))
  2425			return 0;
  2426	
  2427		if (unlikely(!genpd->set_performance_state))
  2428			return 0;
  2429	
  2430		genpd_lock(genpd);
  2431	
  2432		opp = of_dev_pm_opp_find_required_opp(&genpd->dev, opp_node);
  2433		if (IS_ERR(opp)) {
> 2434			dev_err(dev, "Failed to find required OPP: %d\n", PTR_ERR(opp));
  2435			goto unlock;
  2436		}
  2437	
  2438		state = genpd->opp_to_performance_state(genpd, opp);
  2439		dev_pm_opp_put(opp);
  2440	
  2441	unlock:
  2442		genpd_unlock(genpd);
  2443	
  2444		return state;
  2445	}
  2446	EXPORT_SYMBOL_GPL(of_genpd_opp_to_performance_state);
  2447	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[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