lkml.org 
[lkml]   [2021]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] PM: domains: Don't attach a device to genpd that corresponds to a provider
Hi Ulf,

I love your patch! Perhaps something to improve:

[auto build test WARNING on pm/linux-next]
[also build test WARNING on v5.13 next-20210709]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/0day-ci/linux/commits/Ulf-Hansson/PM-domains-Don-t-attach-a-device-to-genpd-that-corresponds-to-a-provider/20210709-205736
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: arm-randconfig-r005-20210709 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8d69635ed9ecf36fd0ca85906bfde17949671cbe)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/5f3ae7877b4b3a9c2c4d96c2106c41b16b981958
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ulf-Hansson/PM-domains-Don-t-attach-a-device-to-genpd-that-corresponds-to-a-provider/20210709-205736
git checkout 5f3ae7877b4b3a9c2c4d96c2106c41b16b981958
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/base/power/domain.c:2704:10: warning: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int' [-Wint-conversion]
return NULL;
^~~~
include/linux/stddef.h:8:14: note: expanded from macro 'NULL'
#define NULL ((void *)0)
^~~~~~~~~~~
1 warning generated.


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

2683
2684 /**
2685 * genpd_dev_pm_attach - Attach a device to its PM domain using DT.
2686 * @dev: Device to attach.
2687 *
2688 * Parse device's OF node to find a PM domain specifier. If such is found,
2689 * attaches the device to retrieved pm_domain ops.
2690 *
2691 * Returns 1 on successfully attached PM domain, 0 when the device don't need a
2692 * PM domain or when multiple power-domains exists for it, else a negative error
2693 * code. Note that if a power-domain exists for the device, but it cannot be
2694 * found or turned on, then return -EPROBE_DEFER to ensure that the device is
2695 * not probed and to re-try again later.
2696 */
2697 int genpd_dev_pm_attach(struct device *dev)
2698 {
2699 if (!dev->of_node)
2700 return 0;
2701
2702 /* Don't try to attach a genpd provider. */
2703 if (of_find_property(dev->of_node, "#power-domain-cells", NULL))
> 2704 return NULL;
2705
2706 /*
2707 * Devices with multiple PM domains must be attached separately, as we
2708 * can only attach one PM domain per device.
2709 */
2710 if (of_count_phandle_with_args(dev->of_node, "power-domains",
2711 "#power-domain-cells") != 1)
2712 return 0;
2713
2714 return __genpd_dev_pm_attach(dev, dev, 0, true);
2715 }
2716 EXPORT_SYMBOL_GPL(genpd_dev_pm_attach);
2717

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-07-09 21:03    [W:0.153 / U:1.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site