[driver-core:const_driver 16/23] drivers/sh/maple/maple.c:779:18: error: initialization of 'int (*)(struct device *, const struct device_driver *)' from incompatible pointer type 'int (*)(struct device *, struct device_driver *)'

kernel test robot <[email protected]> Sat, 15 Jun 2024 15:45:18 +0800
Newsgroups org.linuxdriverproject.driverdev-devel,dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git const_driver
head:   158a3753cd10fdbb78a7abe66a8b70d5408ba7ca
commit: f17ab078e7c67e5579df87737875f784f98b4bce [16/23] driver core: have match() callback in struct bus_type take a const *
config: sh-dreamcast_defconfig (https://download.01.org/0day-ci/archive/20240615/[email protected]/config)
compiler: sh4-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240615/[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]/

All errors (new ones prefixed by >>):

>> drivers/sh/maple/maple.c:779:18: error: initialization of 'int (*)(struct device *, const struct device_driver *)' from incompatible pointer type 'int (*)(struct device *, struct device_driver *)' [-Werror=incompatible-pointer-types]
     779 |         .match = maple_match_bus_driver,
         |                  ^~~~~~~~~~~~~~~~~~~~~~
   drivers/sh/maple/maple.c:779:18: note: (near initialization for 'maple_bus_type.match')
   cc1: some warnings being treated as errors


vim +779 drivers/sh/maple/maple.c

17be2d2b1c333e Adrian McMenamin   2007-09-21  767  
b233b28eac0cc3 Adrian McMenamin   2009-02-27  768  static struct maple_driver maple_unsupported_device = {
17be2d2b1c333e Adrian McMenamin   2007-09-21  769  	.drv = {
b233b28eac0cc3 Adrian McMenamin   2009-02-27  770  		.name = "maple_unsupported_device",
17be2d2b1c333e Adrian McMenamin   2007-09-21  771  		.bus = &maple_bus_type,
17be2d2b1c333e Adrian McMenamin   2007-09-21  772  	},
17be2d2b1c333e Adrian McMenamin   2007-09-21  773  };
ee665ecca6d677 Randy Dunlap       2009-03-28  774  /*
b233b28eac0cc3 Adrian McMenamin   2009-02-27  775   * maple_bus_type - core maple bus structure
b233b28eac0cc3 Adrian McMenamin   2009-02-27  776   */
e76933a9bfa9b7 Greg Kroah-Hartman 2023-12-19  777  static const struct bus_type maple_bus_type = {
17be2d2b1c333e Adrian McMenamin   2007-09-21  778  	.name = "maple",
b233b28eac0cc3 Adrian McMenamin   2009-02-27 @779  	.match = maple_match_bus_driver,
17be2d2b1c333e Adrian McMenamin   2007-09-21  780  };
17be2d2b1c333e Adrian McMenamin   2007-09-21  781  

:::::: The code at line 779 was first introduced by commit
:::::: b233b28eac0cc37d07c2d007ea08c86c778c5af4 sh: maple: Support block reads and writes.

:::::: TO: Adrian McMenamin <[email protected]>
:::::: CC: Paul Mundt <[email protected]>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel