kernel test robot
2023-Jul-22 13:55 UTC
[PATCH v2 21/22] i2c: virtio: Remove #ifdef guards for PM related functions
Hi Paul, kernel test robot noticed the following build errors: [auto build test ERROR on wsa/i2c/for-next] [also build test ERROR on brgl/gpio/for-next krzk/for-next linus/master v6.5-rc2 next-20230721] [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#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Paul-Cercueil/i2c-au1550-Remove-ifdef-guards-for-PM-related-functions/20230722-200209 base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next patch link: https://lore.kernel.org/r/20230722115310.27681-5-paul%40crapouillou.net patch subject: [PATCH v2 21/22] i2c: virtio: Remove #ifdef guards for PM related functions config: nios2-randconfig-r005-20230722 (https://download.01.org/0day-ci/archive/20230722/202307222129.Q7WjPurG-lkp at intel.com/config) compiler: nios2-linux-gcc (GCC) 12.3.0 reproduce: (https://download.01.org/0day-ci/archive/20230722/202307222129.Q7WjPurG-lkp at intel.com/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 at intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202307222129.Q7WjPurG-lkp at intel.com/ All errors (new ones prefixed by >>):>> drivers/i2c/busses/i2c-virtio.c:270:10: error: 'struct virtio_driver' has no member named 'freeze'270 | .freeze = pm_sleep_ptr(virtio_i2c_freeze), | ^~~~~~ In file included from include/linux/cpumask.h:10, from include/linux/smp.h:13, from include/linux/lockdep.h:14, from include/linux/spinlock.h:63, from include/linux/mmzone.h:8, from include/linux/gfp.h:7, from include/linux/slab.h:16, from include/linux/resource_ext.h:11, from include/linux/acpi.h:13, from drivers/i2c/busses/i2c-virtio.c:11:>> include/linux/kernel.h:58:33: error: initialization of 'const struct virtio_device_id *' from incompatible pointer type 'int (*)(struct virtio_device *)' [-Werror=incompatible-pointer-types]58 | #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL) | ^ include/linux/pm.h:452:28: note: in expansion of macro 'PTR_IF' 452 | #define pm_sleep_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_PM_SLEEP), (_ptr)) | ^~~~~~ drivers/i2c/busses/i2c-virtio.c:270:35: note: in expansion of macro 'pm_sleep_ptr' 270 | .freeze = pm_sleep_ptr(virtio_i2c_freeze), | ^~~~~~~~~~~~ include/linux/kernel.h:58:33: note: (near initialization for 'virtio_i2c_driver.id_table') 58 | #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL) | ^ include/linux/pm.h:452:28: note: in expansion of macro 'PTR_IF' 452 | #define pm_sleep_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_PM_SLEEP), (_ptr)) | ^~~~~~ drivers/i2c/busses/i2c-virtio.c:270:35: note: in expansion of macro 'pm_sleep_ptr' 270 | .freeze = pm_sleep_ptr(virtio_i2c_freeze), | ^~~~~~~~~~~~ include/linux/kernel.h:58:33: warning: initialized field overwritten [-Woverride-init] 58 | #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL) | ^ include/linux/pm.h:452:28: note: in expansion of macro 'PTR_IF' 452 | #define pm_sleep_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_PM_SLEEP), (_ptr)) | ^~~~~~ drivers/i2c/busses/i2c-virtio.c:270:35: note: in expansion of macro 'pm_sleep_ptr' 270 | .freeze = pm_sleep_ptr(virtio_i2c_freeze), | ^~~~~~~~~~~~ include/linux/kernel.h:58:33: note: (near initialization for 'virtio_i2c_driver.id_table') 58 | #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL) | ^ include/linux/pm.h:452:28: note: in expansion of macro 'PTR_IF' 452 | #define pm_sleep_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_PM_SLEEP), (_ptr)) | ^~~~~~ drivers/i2c/busses/i2c-virtio.c:270:35: note: in expansion of macro 'pm_sleep_ptr' 270 | .freeze = pm_sleep_ptr(virtio_i2c_freeze), | ^~~~~~~~~~~~>> drivers/i2c/busses/i2c-virtio.c:271:10: error: 'struct virtio_driver' has no member named 'restore'271 | .restore = pm_sleep_ptr(virtio_i2c_restore), | ^~~~~~~>> include/linux/kernel.h:58:33: error: initialization of 'const unsigned int *' from incompatible pointer type 'int (*)(struct virtio_device *)' [-Werror=incompatible-pointer-types]58 | #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL) | ^ include/linux/pm.h:452:28: note: in expansion of macro 'PTR_IF' 452 | #define pm_sleep_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_PM_SLEEP), (_ptr)) | ^~~~~~ drivers/i2c/busses/i2c-virtio.c:271:35: note: in expansion of macro 'pm_sleep_ptr' 271 | .restore = pm_sleep_ptr(virtio_i2c_restore), | ^~~~~~~~~~~~ include/linux/kernel.h:58:33: note: (near initialization for 'virtio_i2c_driver.feature_table') 58 | #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL) | ^ include/linux/pm.h:452:28: note: in expansion of macro 'PTR_IF' 452 | #define pm_sleep_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_PM_SLEEP), (_ptr)) | ^~~~~~ drivers/i2c/busses/i2c-virtio.c:271:35: note: in expansion of macro 'pm_sleep_ptr' 271 | .restore = pm_sleep_ptr(virtio_i2c_restore), | ^~~~~~~~~~~~ include/linux/kernel.h:58:33: warning: initialized field overwritten [-Woverride-init] 58 | #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL) | ^ include/linux/pm.h:452:28: note: in expansion of macro 'PTR_IF' 452 | #define pm_sleep_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_PM_SLEEP), (_ptr)) | ^~~~~~ drivers/i2c/busses/i2c-virtio.c:271:35: note: in expansion of macro 'pm_sleep_ptr' 271 | .restore = pm_sleep_ptr(virtio_i2c_restore), | ^~~~~~~~~~~~ include/linux/kernel.h:58:33: note: (near initialization for 'virtio_i2c_driver.feature_table') 58 | #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL) | ^ include/linux/pm.h:452:28: note: in expansion of macro 'PTR_IF' 452 | #define pm_sleep_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_PM_SLEEP), (_ptr)) | ^~~~~~ drivers/i2c/busses/i2c-virtio.c:271:35: note: in expansion of macro 'pm_sleep_ptr' 271 | .restore = pm_sleep_ptr(virtio_i2c_restore), | ^~~~~~~~~~~~ cc1: some warnings being treated as errors vim +270 drivers/i2c/busses/i2c-virtio.c 260 261 static struct virtio_driver virtio_i2c_driver = { 262 .feature_table = features, 263 .feature_table_size = ARRAY_SIZE(features), 264 .id_table = id_table, 265 .probe = virtio_i2c_probe, 266 .remove = virtio_i2c_remove, 267 .driver = { 268 .name = "i2c_virtio", 269 }, > 270 .freeze = pm_sleep_ptr(virtio_i2c_freeze), > 271 .restore = pm_sleep_ptr(virtio_i2c_restore), 272 }; 273 module_virtio_driver(virtio_i2c_driver); 274 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki