Re: [PATCH 2/2] PM: domain: use per-genpd lockdep class
From: kernel test robot
Date: Sat Jun 19 2021 - 20:40:32 EST
Hi Dmitry,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on pm/linux-next]
[also build test ERROR on v5.13-rc6 next-20210618]
[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/Dmitry-Baryshkov/PM-domains-use-separate-lockdep-class-for-each-genpd/20210617-032213
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/e8b916bca5705e8166b78ec1b58feb27130d07f4
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Dmitry-Baryshkov/PM-domains-use-separate-lockdep-class-for-each-genpd/20210617-032213
git checkout e8b916bca5705e8166b78ec1b58feb27130d07f4
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
drivers/base/power/domain.c: In function 'genpd_lock_init':
>> drivers/base/power/domain.c:1945:8: error: 'struct generic_pm_domain' has no member named 'mlock_key'
1945 | genpd->mlock_key = kzalloc(sizeof(genpd->mlock_key), GFP_KERNEL);
| ^~
drivers/base/power/domain.c:1945:42: error: 'struct generic_pm_domain' has no member named 'mlock_key'
1945 | genpd->mlock_key = kzalloc(sizeof(genpd->mlock_key), GFP_KERNEL);
| ^~
drivers/base/power/domain.c:1946:13: error: 'struct generic_pm_domain' has no member named 'mlock_key'
1946 | if (!genpd->mlock_key)
| ^~
drivers/base/power/domain.c:1949:29: error: 'struct generic_pm_domain' has no member named 'mlock_key'
1949 | lockdep_register_key(genpd->mlock_key);
| ^~
drivers/base/power/domain.c:1951:49: error: 'struct generic_pm_domain' has no member named 'mlock_key'
1951 | __mutex_init(&genpd->mlock, genpd->name, genpd->mlock_key);
| ^~
drivers/base/power/domain.c: In function 'genpd_lock_destroy':
drivers/base/power/domain.c:1961:14: error: 'struct generic_pm_domain' has no member named 'mlock_key'
1961 | kfree(genpd->mlock_key);
| ^~
vim +1945 drivers/base/power/domain.c
1935
1936 static int genpd_lock_init(struct generic_pm_domain *genpd)
1937 {
1938 if (genpd->flags & GENPD_FLAG_IRQ_SAFE) {
1939 spin_lock_init(&genpd->slock);
1940 genpd->lock_ops = &genpd_spin_ops;
1941 } else {
1942 /* Some genpds are static, some are dynamically allocated. To
1943 * make lockdep happy always allocate the key dynamically and
1944 * register it. */
> 1945 genpd->mlock_key = kzalloc(sizeof(genpd->mlock_key), GFP_KERNEL);
1946 if (!genpd->mlock_key)
1947 return -ENOMEM;
1948
1949 lockdep_register_key(genpd->mlock_key);
1950
1951 __mutex_init(&genpd->mlock, genpd->name, genpd->mlock_key);
1952 genpd->lock_ops = &genpd_mtx_ops;
1953 }
1954
1955 return 0;
1956 }
1957
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip