* [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
@ 2024-02-05 7:15 kernel test robot
2024-02-05 13:29 ` Ricardo B. Marliere
2024-02-05 17:41 ` [PATCH wq/for-6.9] Revert "workqueue: make wq_subsys const" Tejun Heo
0 siblings, 2 replies; 5+ messages in thread
From: kernel test robot @ 2024-02-05 7:15 UTC (permalink / raw)
To: Ricardo B. Marliere
Cc: llvm, oe-kbuild-all, Linux Memory Management List, Tejun Heo
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@intel.com/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@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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402051505.kM9Rr3CJ-lkp@intel.com/
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@gmail.com>
:::::: CC: Tejun Heo <tj@kernel.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [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
2024-02-05 7:15 [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 kernel test robot
@ 2024-02-05 13:29 ` Ricardo B. Marliere
2024-02-05 17:43 ` Tejun Heo
2024-02-05 17:41 ` [PATCH wq/for-6.9] Revert "workqueue: make wq_subsys const" Tejun Heo
1 sibling, 1 reply; 5+ messages in thread
From: Ricardo B. Marliere @ 2024-02-05 13:29 UTC (permalink / raw)
To: kernel test robot
Cc: llvm, oe-kbuild-all, Linux Memory Management List, Tejun Heo
On 5 Feb 15:15, kernel test robot wrote:
> 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@intel.com/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@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@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202402051505.kM9Rr3CJ-lkp@intel.com/
>
> 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,
I'm not sure how to flag this as invalid, since this is fixed already in
32f78abe59c7 ("driver core: bus: constantify subsys_register() calls")
> | ^
> 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@gmail.com>
> :::::: CC: Tejun Heo <tj@kernel.org>
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH wq/for-6.9] Revert "workqueue: make wq_subsys const"
2024-02-05 7:15 [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 kernel test robot
2024-02-05 13:29 ` Ricardo B. Marliere
@ 2024-02-05 17:41 ` Tejun Heo
1 sibling, 0 replies; 5+ messages in thread
From: Tejun Heo @ 2024-02-05 17:41 UTC (permalink / raw)
To: kernel test robot
Cc: Ricardo B. Marliere, llvm, oe-kbuild-all, Linux Memory Management List
From 4f19b8e01e2fb6c97d4307abb7bde4d34a1e601e Mon Sep 17 00:00:00 2001
From: Tejun Heo <tj@kernel.org>
Date: Mon, 5 Feb 2024 07:18:08 -1000
This reverts commit d412ace11144aa2bf692c7cf9778351efc15c827. This leads to
build failures as it depends on a driver-core commit 32f78abe59c7 ("driver
core: bus: constantify subsys_register() calls"). Let's drop it from wq tree
and route it through driver-core tree.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202402051505.kM9Rr3CJ-lkp@intel.com/
---
kernel/workqueue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 78b4b992e1a3..524a7fff52af 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -6874,7 +6874,7 @@ static struct device_attribute wq_sysfs_unbound_attrs[] = {
__ATTR_NULL,
};
-static const struct bus_type wq_subsys = {
+static struct bus_type wq_subsys = {
.name = "workqueue",
.dev_groups = wq_sysfs_groups,
};
--
2.43.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [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
2024-02-05 13:29 ` Ricardo B. Marliere
@ 2024-02-05 17:43 ` Tejun Heo
2024-02-06 17:48 ` Ricardo B. Marliere
0 siblings, 1 reply; 5+ messages in thread
From: Tejun Heo @ 2024-02-05 17:43 UTC (permalink / raw)
To: Ricardo B. Marliere
Cc: kernel test robot, llvm, oe-kbuild-all, Linux Memory Management List
Hello, Ricardo.
On Mon, Feb 05, 2024 at 10:29:30AM -0300, Ricardo B. Marliere wrote:
> I'm not sure how to flag this as invalid, since this is fixed already in
> 32f78abe59c7 ("driver core: bus: constantify subsys_register() calls")
So, when there are cross-tree dependencies, it's best to note them when
sending out the patch so that the preparatory pulls can be made to avoid
breaking the applying trees. I just reverted the patch for now and think
it'd be best to route this patch through the driver-core tree. Can you
please repost the patch and ask Greg to apply it.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [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
2024-02-05 17:43 ` Tejun Heo
@ 2024-02-06 17:48 ` Ricardo B. Marliere
0 siblings, 0 replies; 5+ messages in thread
From: Ricardo B. Marliere @ 2024-02-06 17:48 UTC (permalink / raw)
To: Tejun Heo
Cc: kernel test robot, llvm, oe-kbuild-all, Linux Memory Management List
Hi Tejun,
On 5 Feb 07:43, Tejun Heo wrote:
> Hello, Ricardo.
>
> On Mon, Feb 05, 2024 at 10:29:30AM -0300, Ricardo B. Marliere wrote:
> > I'm not sure how to flag this as invalid, since this is fixed already in
> > 32f78abe59c7 ("driver core: bus: constantify subsys_register() calls")
>
> So, when there are cross-tree dependencies, it's best to note them when
> sending out the patch so that the preparatory pulls can be made to avoid
> breaking the applying trees. I just reverted the patch for now and think
> it'd be best to route this patch through the driver-core tree. Can you
> please repost the patch and ask Greg to apply it.
Sorry for that, I'll resend to Greg then.
Thank you,
- Ricardo.
>
> Thanks.
>
> --
> tejun
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-02-06 17:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-05 7:15 [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 kernel test robot
2024-02-05 13:29 ` Ricardo B. Marliere
2024-02-05 17:43 ` Tejun Heo
2024-02-06 17:48 ` Ricardo B. Marliere
2024-02-05 17:41 ` [PATCH wq/for-6.9] Revert "workqueue: make wq_subsys const" Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox