[linux-next:master 3841/4021] kernel/workqueue.c:6798:32: error: passing 'const struct bus_type *' to parameter of type 'struct bus_type *' discards qualifiers

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   23e11d0318521e8693459b0e4d23aec614b3b68b
commit: d412ace11144aa2bf692c7cf9778351efc15c827 [3841/4021] workqueue: make wq_subsys const
config: i386-buildonly-randconfig-003-20240205 (https://download.01.org/0day-ci/archive/20240205/202402051505.kM9Rr3CJ-lkp@xxxxxxxxx/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240205/202402051505.kM9Rr3CJ-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/202402051505.kM9Rr3CJ-lkp@xxxxxxxxx/

Note: the linux-next/master HEAD 23e11d0318521e8693459b0e4d23aec614b3b68b builds fine.
      It may have been fixed somewhere.

All errors (new ones prefixed by >>):

>> kernel/workqueue.c:6798:32: error: passing 'const struct bus_type *' to parameter of type 'struct bus_type *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
    6798 |         err = subsys_virtual_register(&wq_subsys, NULL);
         |                                       ^~~~~~~~~~
   include/linux/device.h:77:46: note: passing argument to parameter 'subsys' here
      77 | int subsys_virtual_register(struct bus_type *subsys,
         |                                              ^
   1 error generated.


vim +6798 kernel/workqueue.c

b05a79280b346e Frederic Weisbecker 2015-04-27  6792  
6ba94429c8e7b8 Frederic Weisbecker 2015-04-02  6793  static int __init wq_sysfs_init(void)
2d3854a37e8b76 Rusty Russell       2008-11-05  6794  {
686f669780276d Greg Kroah-Hartman  2023-03-13  6795  	struct device *dev_root;
b05a79280b346e Frederic Weisbecker 2015-04-27  6796  	int err;
b05a79280b346e Frederic Weisbecker 2015-04-27  6797  
b05a79280b346e Frederic Weisbecker 2015-04-27 @6798  	err = subsys_virtual_register(&wq_subsys, NULL);
b05a79280b346e Frederic Weisbecker 2015-04-27  6799  	if (err)
b05a79280b346e Frederic Weisbecker 2015-04-27  6800  		return err;
b05a79280b346e Frederic Weisbecker 2015-04-27  6801  
686f669780276d Greg Kroah-Hartman  2023-03-13  6802  	dev_root = bus_get_dev_root(&wq_subsys);
686f669780276d Greg Kroah-Hartman  2023-03-13  6803  	if (dev_root) {
fe28f631fa941f Waiman Long         2023-10-25  6804  		struct device_attribute *attr;
fe28f631fa941f Waiman Long         2023-10-25  6805  
fe28f631fa941f Waiman Long         2023-10-25  6806  		for (attr = wq_sysfs_cpumask_attrs; attr->attr.name; attr++) {
fe28f631fa941f Waiman Long         2023-10-25  6807  			err = device_create_file(dev_root, attr);
fe28f631fa941f Waiman Long         2023-10-25  6808  			if (err)
fe28f631fa941f Waiman Long         2023-10-25  6809  				break;
fe28f631fa941f Waiman Long         2023-10-25  6810  		}
686f669780276d Greg Kroah-Hartman  2023-03-13  6811  		put_device(dev_root);
686f669780276d Greg Kroah-Hartman  2023-03-13  6812  	}
686f669780276d Greg Kroah-Hartman  2023-03-13  6813  	return err;
2d3854a37e8b76 Rusty Russell       2008-11-05  6814  }
6ba94429c8e7b8 Frederic Weisbecker 2015-04-02  6815  core_initcall(wq_sysfs_init);
2d3854a37e8b76 Rusty Russell       2008-11-05  6816  

:::::: The code at line 6798 was first introduced by commit
:::::: b05a79280b346eb24ddb73b39988398015291075 workqueue: Create low-level unbound workqueues cpumask

:::::: TO: Frederic Weisbecker <fweisbec@xxxxxxxxx>
:::::: CC: Tejun Heo <tj@xxxxxxxxxx>

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux