[android-common:main-16k-gs-shusky-5.15 35/35] drivers/cma_test/cma_alloc_test_drv.c:75:19: error: initialization of 'int (*)(struct platform_device *)' from incompatible pointer type 'void (*)(struct platform_device *)'

kernel test robot <[email protected]> Tue, 28 Jul 2026 17:04:32 +0800
Newsgroups dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
tree:   https://android.googlesource.com/kernel/common main-16k-gs-shusky-5.15
head:   d0ed0375a65ca817f907805e163e103822348f02
commit: 15432ccf862045408c00db1c2d0ee04fdc415ac6 [35/35] ANDROID: cma: Skeleton for CMA alloc test driver
config: x86_64-randconfig-161 (https://download.01.org/0day-ci/archive/20260728/[email protected]/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
smatch: v0.5.0-9187-g5189e3fb
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260728/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

Note: the android-common/main-16k-gs-shusky-5.15 HEAD d0ed0375a65ca817f907805e163e103822348f02 builds fine.
      It only hurts bisectability.

All errors (new ones prefixed by >>):

>> drivers/cma_test/cma_alloc_test_drv.c:75:19: error: initialization of 'int (*)(struct platform_device *)' from incompatible pointer type 'void (*)(struct platform_device *)' [-Werror=incompatible-pointer-types]
      75 |         .remove = cma_test_remove,
         |                   ^~~~~~~~~~~~~~~
   drivers/cma_test/cma_alloc_test_drv.c:75:19: note: (near initialization for 'cma_test_driver.remove')
   cc1: some warnings being treated as errors


vim +75 drivers/cma_test/cma_alloc_test_drv.c

    67	
    68	static struct platform_driver cma_test_driver = {
    69		.driver = {
    70			.name = "cma_alloc_test",
    71			.owner = THIS_MODULE,
    72			.of_match_table = of_match_ptr(cma_test_dt_ids),
    73		},
    74		.probe = cma_test_probe,
  > 75		.remove = cma_test_remove,
    76		.suspend = cma_test_suspend,
    77		.shutdown = cma_test_shutdown,
    78		.resume = cma_test_resume,
    79		.id_table = cma_test_id_table,
    80	};
    81	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki