[driver-core:const_work 180/183] drivers/bus/fsl-mc/fsl-mc-bus.c:409:20: sparse: sparse: incorrect type in initializer (different modifiers)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git const_work
head:   77294dd75aa919b6af3a44e9d68c441ea5d7de59
commit: 3ee4e4da3bc4d912fb1519b56f9922c52f0b12a9 [180/183] bus: fsl-mc: constify the struct device_type usage
config: arm64-randconfig-r112-20240308 (https://download.01.org/0day-ci/archive/20240309/202403091124.VOzGG1lj-lkp@xxxxxxxxx/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20240309/202403091124.VOzGG1lj-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403091124.VOzGG1lj-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> drivers/bus/fsl-mc/fsl-mc-bus.c:409:20: sparse: sparse: incorrect type in initializer (different modifiers) @@     expected struct device_type *dev_type @@     got struct device_type const * @@
   drivers/bus/fsl-mc/fsl-mc-bus.c:409:20: sparse:     expected struct device_type *dev_type
   drivers/bus/fsl-mc/fsl-mc-bus.c:409:20: sparse:     got struct device_type const *
   drivers/bus/fsl-mc/fsl-mc-bus.c:410:20: sparse: sparse: incorrect type in initializer (different modifiers) @@     expected struct device_type *dev_type @@     got struct device_type const * @@
   drivers/bus/fsl-mc/fsl-mc-bus.c:410:20: sparse:     expected struct device_type *dev_type
   drivers/bus/fsl-mc/fsl-mc-bus.c:410:20: sparse:     got struct device_type const *
   drivers/bus/fsl-mc/fsl-mc-bus.c:411:20: sparse: sparse: incorrect type in initializer (different modifiers) @@     expected struct device_type *dev_type @@     got struct device_type const * @@
   drivers/bus/fsl-mc/fsl-mc-bus.c:411:20: sparse:     expected struct device_type *dev_type
   drivers/bus/fsl-mc/fsl-mc-bus.c:411:20: sparse:     got struct device_type const *
   drivers/bus/fsl-mc/fsl-mc-bus.c:412:20: sparse: sparse: incorrect type in initializer (different modifiers) @@     expected struct device_type *dev_type @@     got struct device_type const * @@
   drivers/bus/fsl-mc/fsl-mc-bus.c:412:20: sparse:     expected struct device_type *dev_type
   drivers/bus/fsl-mc/fsl-mc-bus.c:412:20: sparse:     got struct device_type const *
   drivers/bus/fsl-mc/fsl-mc-bus.c:413:20: sparse: sparse: incorrect type in initializer (different modifiers) @@     expected struct device_type *dev_type @@     got struct device_type const * @@
   drivers/bus/fsl-mc/fsl-mc-bus.c:413:20: sparse:     expected struct device_type *dev_type
   drivers/bus/fsl-mc/fsl-mc-bus.c:413:20: sparse:     got struct device_type const *
   drivers/bus/fsl-mc/fsl-mc-bus.c:414:20: sparse: sparse: incorrect type in initializer (different modifiers) @@     expected struct device_type *dev_type @@     got struct device_type const * @@
   drivers/bus/fsl-mc/fsl-mc-bus.c:414:20: sparse:     expected struct device_type *dev_type
   drivers/bus/fsl-mc/fsl-mc-bus.c:414:20: sparse:     got struct device_type const *
   drivers/bus/fsl-mc/fsl-mc-bus.c:415:20: sparse: sparse: incorrect type in initializer (different modifiers) @@     expected struct device_type *dev_type @@     got struct device_type const * @@
   drivers/bus/fsl-mc/fsl-mc-bus.c:415:20: sparse:     expected struct device_type *dev_type
   drivers/bus/fsl-mc/fsl-mc-bus.c:415:20: sparse:     got struct device_type const *
   drivers/bus/fsl-mc/fsl-mc-bus.c:416:20: sparse: sparse: incorrect type in initializer (different modifiers) @@     expected struct device_type *dev_type @@     got struct device_type const * @@
   drivers/bus/fsl-mc/fsl-mc-bus.c:416:20: sparse:     expected struct device_type *dev_type
   drivers/bus/fsl-mc/fsl-mc-bus.c:416:20: sparse:     got struct device_type const *
   drivers/bus/fsl-mc/fsl-mc-bus.c:417:20: sparse: sparse: incorrect type in initializer (different modifiers) @@     expected struct device_type *dev_type @@     got struct device_type const * @@
   drivers/bus/fsl-mc/fsl-mc-bus.c:417:20: sparse:     expected struct device_type *dev_type
   drivers/bus/fsl-mc/fsl-mc-bus.c:417:20: sparse:     got struct device_type const *
   drivers/bus/fsl-mc/fsl-mc-bus.c:418:20: sparse: sparse: incorrect type in initializer (different modifiers) @@     expected struct device_type *dev_type @@     got struct device_type const * @@
   drivers/bus/fsl-mc/fsl-mc-bus.c:418:20: sparse:     expected struct device_type *dev_type
   drivers/bus/fsl-mc/fsl-mc-bus.c:418:20: sparse:     got struct device_type const *
   drivers/bus/fsl-mc/fsl-mc-bus.c:419:20: sparse: sparse: incorrect type in initializer (different modifiers) @@     expected struct device_type *dev_type @@     got struct device_type const * @@
   drivers/bus/fsl-mc/fsl-mc-bus.c:419:20: sparse:     expected struct device_type *dev_type
   drivers/bus/fsl-mc/fsl-mc-bus.c:419:20: sparse:     got struct device_type const *
   drivers/bus/fsl-mc/fsl-mc-bus.c:420:20: sparse: sparse: incorrect type in initializer (different modifiers) @@     expected struct device_type *dev_type @@     got struct device_type const * @@
   drivers/bus/fsl-mc/fsl-mc-bus.c:420:20: sparse:     expected struct device_type *dev_type
   drivers/bus/fsl-mc/fsl-mc-bus.c:420:20: sparse:     got struct device_type const *
   drivers/bus/fsl-mc/fsl-mc-bus.c:421:20: sparse: sparse: incorrect type in initializer (different modifiers) @@     expected struct device_type *dev_type @@     got struct device_type const * @@
   drivers/bus/fsl-mc/fsl-mc-bus.c:421:20: sparse:     expected struct device_type *dev_type
   drivers/bus/fsl-mc/fsl-mc-bus.c:421:20: sparse:     got struct device_type const *
   drivers/bus/fsl-mc/fsl-mc-bus.c:422:20: sparse: sparse: incorrect type in initializer (different modifiers) @@     expected struct device_type *dev_type @@     got struct device_type const * @@
   drivers/bus/fsl-mc/fsl-mc-bus.c:422:20: sparse:     expected struct device_type *dev_type
   drivers/bus/fsl-mc/fsl-mc-bus.c:422:20: sparse:     got struct device_type const *
   drivers/bus/fsl-mc/fsl-mc-bus.c:423:20: sparse: sparse: incorrect type in initializer (different modifiers) @@     expected struct device_type *dev_type @@     got struct device_type const * @@
   drivers/bus/fsl-mc/fsl-mc-bus.c:423:20: sparse:     expected struct device_type *dev_type
   drivers/bus/fsl-mc/fsl-mc-bus.c:423:20: sparse:     got struct device_type const *
   drivers/bus/fsl-mc/fsl-mc-bus.c:424:20: sparse: sparse: incorrect type in initializer (different modifiers) @@     expected struct device_type *dev_type @@     got struct device_type const * @@
   drivers/bus/fsl-mc/fsl-mc-bus.c:424:20: sparse:     expected struct device_type *dev_type
   drivers/bus/fsl-mc/fsl-mc-bus.c:424:20: sparse:     got struct device_type const *

vim +409 drivers/bus/fsl-mc/fsl-mc-bus.c

a3b7a581823857 drivers/bus/fsl-mc/fsl-mc-bus.c         Ioana Ciornei       2020-07-17  397  
3ee4e4da3bc4d9 drivers/bus/fsl-mc/fsl-mc-bus.c         Ricardo B. Marliere 2024-02-19 @398  const struct device_type fsl_mc_bus_dpdbg_type = {
e70ba1b06c26cd drivers/bus/fsl-mc/fsl-mc-bus.c         Ioana Ciornei       2021-02-08  399  	.name = "fsl_mc_bus_dpdbg"
e70ba1b06c26cd drivers/bus/fsl-mc/fsl-mc-bus.c         Ioana Ciornei       2021-02-08  400  };
e70ba1b06c26cd drivers/bus/fsl-mc/fsl-mc-bus.c         Ioana Ciornei       2021-02-08  401  EXPORT_SYMBOL_GPL(fsl_mc_bus_dpdbg_type);
e70ba1b06c26cd drivers/bus/fsl-mc/fsl-mc-bus.c         Ioana Ciornei       2021-02-08  402  
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17  403  static struct device_type *fsl_mc_get_device_type(const char *type)
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17  404  {
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17  405  	static const struct {
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17  406  		struct device_type *dev_type;
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17  407  		const char *type;
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17  408  	} dev_types[] = {
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17 @409  		{ &fsl_mc_bus_dprc_type, "dprc" },
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17  410  		{ &fsl_mc_bus_dpni_type, "dpni" },
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17  411  		{ &fsl_mc_bus_dpio_type, "dpio" },
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17  412  		{ &fsl_mc_bus_dpsw_type, "dpsw" },
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17  413  		{ &fsl_mc_bus_dpbp_type, "dpbp" },
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17  414  		{ &fsl_mc_bus_dpcon_type, "dpcon" },
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17  415  		{ &fsl_mc_bus_dpmcp_type, "dpmcp" },
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17  416  		{ &fsl_mc_bus_dpmac_type, "dpmac" },
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17  417  		{ &fsl_mc_bus_dprtc_type, "dprtc" },
e9158b35ef9afb drivers/bus/fsl-mc/fsl-mc-bus.c         Horia Geantă        2018-09-12  418  		{ &fsl_mc_bus_dpseci_type, "dpseci" },
a3b7a581823857 drivers/bus/fsl-mc/fsl-mc-bus.c         Ioana Ciornei       2020-07-17  419  		{ &fsl_mc_bus_dpdmux_type, "dpdmux" },
a3b7a581823857 drivers/bus/fsl-mc/fsl-mc-bus.c         Ioana Ciornei       2020-07-17  420  		{ &fsl_mc_bus_dpdcei_type, "dpdcei" },
a3b7a581823857 drivers/bus/fsl-mc/fsl-mc-bus.c         Ioana Ciornei       2020-07-17  421  		{ &fsl_mc_bus_dpaiop_type, "dpaiop" },
a3b7a581823857 drivers/bus/fsl-mc/fsl-mc-bus.c         Ioana Ciornei       2020-07-17  422  		{ &fsl_mc_bus_dpci_type, "dpci" },
a3b7a581823857 drivers/bus/fsl-mc/fsl-mc-bus.c         Ioana Ciornei       2020-07-17  423  		{ &fsl_mc_bus_dpdmai_type, "dpdmai" },
e70ba1b06c26cd drivers/bus/fsl-mc/fsl-mc-bus.c         Ioana Ciornei       2021-02-08  424  		{ &fsl_mc_bus_dpdbg_type, "dpdbg" },
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17  425  		{ NULL, NULL }
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17  426  	};
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17  427  	int i;
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17  428  
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17  429  	for (i = 0; dev_types[i].dev_type; i++)
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17  430  		if (!strcmp(dev_types[i].type, type))
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17  431  			return dev_types[i].dev_type;
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17  432  
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17  433  	return NULL;
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17  434  }
47433b630b7b30 drivers/staging/fsl-mc/bus/fsl-mc-bus.c Laurentiu Tudor     2017-11-17  435  

:::::: The code at line 409 was first introduced by commit
:::::: 47433b630b7b30d0daa360c64308c0f4c9632986 staging: fsl-mc: add support for device type

:::::: TO: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>
:::::: CC: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

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




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux