lkml.org 
[lkml]   [2022]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[jic23-iio:testing 164/201] drivers/iio/adc/ab8500-gpadc.c:1201:67: error: macro "DEFINE_RUNTIME_DEV_PM_OPS" requires 4 arguments, but only 3 given
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git testing
head: 4c3bdc9c82a61368384e42c3c0100c32efa76262
commit: 23a133c1ba6796397da5bf8cad8640d136cf06d3 [164/201] iio:adc:ab8500: Switch from CONFIG_PM guards to pm_ptr() etc
config: arm-u8500_defconfig (https://download.01.org/0day-ci/archive/20220221/202202211004.q7F2574D-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/commit/?id=23a133c1ba6796397da5bf8cad8640d136cf06d3
git remote add jic23-iio https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git
git fetch --no-tags jic23-iio testing
git checkout 23a133c1ba6796397da5bf8cad8640d136cf06d3
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

>> drivers/iio/adc/ab8500-gpadc.c:1201:67: error: macro "DEFINE_RUNTIME_DEV_PM_OPS" requires 4 arguments, but only 3 given
1201 | ab8500_gpadc_runtime_resume, NULL);
| ^
In file included from drivers/iio/adc/ab8500-gpadc.c:33:
include/linux/pm_runtime.h:37: note: macro "DEFINE_RUNTIME_DEV_PM_OPS" defined here
37 | #define DEFINE_RUNTIME_DEV_PM_OPS(name, suspend_fn, resume_fn, idle_fn) \
|
>> drivers/iio/adc/ab8500-gpadc.c:1200:8: error: type defaults to 'int' in declaration of 'DEFINE_RUNTIME_DEV_PM_OPS' [-Werror=implicit-int]
1200 | static DEFINE_RUNTIME_DEV_PM_OPS(ab8500_gpadc_runtime_suspend,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/cpumask.h:10,
from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/rcupdate.h:29,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/iio/iio.h:10,
from drivers/iio/adc/ab8500-gpadc.c:27:
>> drivers/iio/adc/ab8500-gpadc.c:1208:31: error: 'ab8500_gpadc_pm_ops' undeclared here (not in a function); did you mean 'ab8500_gpadc_probe'?
1208 | .pm = pm_ptr(&ab8500_gpadc_pm_ops),
| ^~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:57:44: note: in definition of macro 'PTR_IF'
57 | #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL)
| ^~~
drivers/iio/adc/ab8500-gpadc.c:1208:23: note: in expansion of macro 'pm_ptr'
1208 | .pm = pm_ptr(&ab8500_gpadc_pm_ops),
| ^~~~~~
drivers/iio/adc/ab8500-gpadc.c:1200:8: warning: 'DEFINE_RUNTIME_DEV_PM_OPS' defined but not used [-Wunused-variable]
1200 | static DEFINE_RUNTIME_DEV_PM_OPS(ab8500_gpadc_runtime_suspend,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/adc/ab8500-gpadc.c:955:12: warning: 'ab8500_gpadc_runtime_resume' defined but not used [-Wunused-function]
955 | static int ab8500_gpadc_runtime_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/adc/ab8500-gpadc.c:945:12: warning: 'ab8500_gpadc_runtime_suspend' defined but not used [-Wunused-function]
945 | static int ab8500_gpadc_runtime_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors


vim +/DEFINE_RUNTIME_DEV_PM_OPS +1201 drivers/iio/adc/ab8500-gpadc.c

1199
> 1200 static DEFINE_RUNTIME_DEV_PM_OPS(ab8500_gpadc_runtime_suspend,
> 1201 ab8500_gpadc_runtime_resume, NULL);
1202
1203 static struct platform_driver ab8500_gpadc_driver = {
1204 .probe = ab8500_gpadc_probe,
1205 .remove = ab8500_gpadc_remove,
1206 .driver = {
1207 .name = "ab8500-gpadc",
> 1208 .pm = pm_ptr(&ab8500_gpadc_pm_ops),

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

\
 
 \ /
  Last update: 2022-02-21 04:21    [W:0.046 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site