* [PATCH 0/2] drivers: xen: struct bus_type cleanup
@ 2024-02-03 18:53 Ricardo B. Marliere
2024-02-03 18:53 ` [PATCH 1/2] xen: pcpu: make xen_pcpu_subsys const Ricardo B. Marliere
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ricardo B. Marliere @ 2024-02-03 18:53 UTC (permalink / raw)
To: Juergen Gross, Stefano Stabellini, Oleksandr Tyshchenko
Cc: xen-devel, linux-kernel, Greg Kroah-Hartman, Ricardo B. Marliere
This series is part of an effort to cleanup the users of the driver
core, as can be seen in many recent patches authored by Greg across the
tree (e.g. [1]). Specifically, this series is part of the task of
splitting one of his TODOs [2].
---
[1]: https://lore.kernel.org/lkml/?q=f%3Agregkh%40linuxfoundation.org+s%3A%22make%22+and+s%3A%22const%22
[2]: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/commit/?h=bus_cleanup&id=26105f537f0c60eacfeb430abd2e05d7ddcdd8aa
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
---
Ricardo B. Marliere (2):
xen: pcpu: make xen_pcpu_subsys const
xen: balloon: make balloon_subsys const
drivers/xen/pcpu.c | 2 +-
drivers/xen/xen-balloon.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
base-commit: 2d2db7d40254d5fb53b11ebd703cd1ed0c5de7a1
change-id: 20240203-bus_cleanup-xen-da95a6226a35
Best regards,
--
Ricardo B. Marliere <ricardo@marliere.net>
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/2] xen: pcpu: make xen_pcpu_subsys const
2024-02-03 18:53 [PATCH 0/2] drivers: xen: struct bus_type cleanup Ricardo B. Marliere
@ 2024-02-03 18:53 ` Ricardo B. Marliere
2024-02-03 18:53 ` [PATCH 2/2] xen: balloon: make balloon_subsys const Ricardo B. Marliere
2024-02-03 21:23 ` [PATCH 0/2] drivers: xen: struct bus_type cleanup Greg Kroah-Hartman
2 siblings, 0 replies; 4+ messages in thread
From: Ricardo B. Marliere @ 2024-02-03 18:53 UTC (permalink / raw)
To: Juergen Gross, Stefano Stabellini, Oleksandr Tyshchenko
Cc: xen-devel, linux-kernel, Greg Kroah-Hartman, Ricardo B. Marliere
Now that the driver core can properly handle constant struct bus_type,
move the xen_pcpu_subsys variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
---
drivers/xen/pcpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/xen/pcpu.c b/drivers/xen/pcpu.c
index 508655273145..c63f317e3df3 100644
--- a/drivers/xen/pcpu.c
+++ b/drivers/xen/pcpu.c
@@ -65,7 +65,7 @@ struct pcpu {
uint32_t flags;
};
-static struct bus_type xen_pcpu_subsys = {
+static const struct bus_type xen_pcpu_subsys = {
.name = "xen_cpu",
.dev_name = "xen_cpu",
};
--
2.43.0
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 2/2] xen: balloon: make balloon_subsys const
2024-02-03 18:53 [PATCH 0/2] drivers: xen: struct bus_type cleanup Ricardo B. Marliere
2024-02-03 18:53 ` [PATCH 1/2] xen: pcpu: make xen_pcpu_subsys const Ricardo B. Marliere
@ 2024-02-03 18:53 ` Ricardo B. Marliere
2024-02-03 21:23 ` [PATCH 0/2] drivers: xen: struct bus_type cleanup Greg Kroah-Hartman
2 siblings, 0 replies; 4+ messages in thread
From: Ricardo B. Marliere @ 2024-02-03 18:53 UTC (permalink / raw)
To: Juergen Gross, Stefano Stabellini, Oleksandr Tyshchenko
Cc: xen-devel, linux-kernel, Greg Kroah-Hartman, Ricardo B. Marliere
Now that the driver core can properly handle constant struct bus_type,
move the balloon_subsys variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
---
drivers/xen/xen-balloon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/xen/xen-balloon.c b/drivers/xen/xen-balloon.c
index 8cd583db20b1..b293d7652f15 100644
--- a/drivers/xen/xen-balloon.c
+++ b/drivers/xen/xen-balloon.c
@@ -237,7 +237,7 @@ static const struct attribute_group *balloon_groups[] = {
NULL
};
-static struct bus_type balloon_subsys = {
+static const struct bus_type balloon_subsys = {
.name = BALLOON_CLASS_NAME,
.dev_name = BALLOON_CLASS_NAME,
};
--
2.43.0
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 0/2] drivers: xen: struct bus_type cleanup
2024-02-03 18:53 [PATCH 0/2] drivers: xen: struct bus_type cleanup Ricardo B. Marliere
2024-02-03 18:53 ` [PATCH 1/2] xen: pcpu: make xen_pcpu_subsys const Ricardo B. Marliere
2024-02-03 18:53 ` [PATCH 2/2] xen: balloon: make balloon_subsys const Ricardo B. Marliere
@ 2024-02-03 21:23 ` Greg Kroah-Hartman
2 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2024-02-03 21:23 UTC (permalink / raw)
To: Ricardo B. Marliere
Cc: Juergen Gross, Stefano Stabellini, Oleksandr Tyshchenko,
xen-devel, linux-kernel
On Sat, Feb 03, 2024 at 03:53:36PM -0300, Ricardo B. Marliere wrote:
> This series is part of an effort to cleanup the users of the driver
> core, as can be seen in many recent patches authored by Greg across the
> tree (e.g. [1]). Specifically, this series is part of the task of
> splitting one of his TODOs [2].
>
> ---
> [1]: https://lore.kernel.org/lkml/?q=f%3Agregkh%40linuxfoundation.org+s%3A%22make%22+and+s%3A%22const%22
> [2]: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/commit/?h=bus_cleanup&id=26105f537f0c60eacfeb430abd2e05d7ddcdd8aa
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-02-03 21:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-03 18:53 [PATCH 0/2] drivers: xen: struct bus_type cleanup Ricardo B. Marliere
2024-02-03 18:53 ` [PATCH 1/2] xen: pcpu: make xen_pcpu_subsys const Ricardo B. Marliere
2024-02-03 18:53 ` [PATCH 2/2] xen: balloon: make balloon_subsys const Ricardo B. Marliere
2024-02-03 21:23 ` [PATCH 0/2] drivers: xen: struct bus_type cleanup Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®