linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] mips: struct bus_type cleanup
@ 2024-02-04 15:06 Ricardo B. Marliere
  2024-02-04 15:06 ` [PATCH 1/2] mips: sgi-ip22: make gio_bus_type const Ricardo B. Marliere
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ricardo B. Marliere @ 2024-02-04 15:06 UTC (permalink / raw)
  To: Thomas Bogendoerfer
  Cc: linux-mips, 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):
      mips: sgi-ip22: make gio_bus_type const
      mips: txx9: make txx9_sramc_subsys const

 arch/mips/sgi-ip22/ip22-gio.c  | 4 ++--
 arch/mips/txx9/generic/setup.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
---
base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d
change-id: 20240204-bus_cleanup-mips-be3d52c96e32

Best regards,
-- 
Ricardo B. Marliere <ricardo@marliere.net>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] mips: sgi-ip22: make gio_bus_type const
  2024-02-04 15:06 [PATCH 0/2] mips: struct bus_type cleanup Ricardo B. Marliere
@ 2024-02-04 15:06 ` Ricardo B. Marliere
  2024-02-04 15:06 ` [PATCH 2/2] mips: txx9: make txx9_sramc_subsys const Ricardo B. Marliere
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Ricardo B. Marliere @ 2024-02-04 15:06 UTC (permalink / raw)
  To: Thomas Bogendoerfer
  Cc: linux-mips, linux-kernel, Greg Kroah-Hartman, Ricardo B. Marliere

Now that the driver core can properly handle constant struct bus_type,
move the gio_bus_type 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>
---
 arch/mips/sgi-ip22/ip22-gio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/sgi-ip22/ip22-gio.c b/arch/mips/sgi-ip22/ip22-gio.c
index 81c9f0a8880b..a3cdcb289941 100644
--- a/arch/mips/sgi-ip22/ip22-gio.c
+++ b/arch/mips/sgi-ip22/ip22-gio.c
@@ -12,7 +12,7 @@
 #include <asm/sgi/mc.h>
 #include <asm/sgi/ip22.h>
 
-static struct bus_type gio_bus_type;
+static const struct bus_type gio_bus_type;
 
 static struct {
 	const char *name;
@@ -378,7 +378,7 @@ static void ip22_check_gio(int slotno, unsigned long addr, int irq)
 		printk(KERN_INFO "GIO: slot %d : Empty\n", slotno);
 }
 
-static struct bus_type gio_bus_type = {
+static const struct bus_type gio_bus_type = {
 	.name	   = "gio",
 	.dev_groups = gio_dev_groups,
 	.match	   = gio_bus_match,

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] mips: txx9: make txx9_sramc_subsys const
  2024-02-04 15:06 [PATCH 0/2] mips: struct bus_type cleanup Ricardo B. Marliere
  2024-02-04 15:06 ` [PATCH 1/2] mips: sgi-ip22: make gio_bus_type const Ricardo B. Marliere
@ 2024-02-04 15:06 ` Ricardo B. Marliere
  2024-02-05 12:51 ` [PATCH 0/2] mips: struct bus_type cleanup Greg Kroah-Hartman
  2024-02-20 13:38 ` Thomas Bogendoerfer
  3 siblings, 0 replies; 5+ messages in thread
From: Ricardo B. Marliere @ 2024-02-04 15:06 UTC (permalink / raw)
  To: Thomas Bogendoerfer
  Cc: linux-mips, linux-kernel, Greg Kroah-Hartman, Ricardo B. Marliere

Now that the driver core can properly handle constant struct bus_type,
move the txx9_sramc_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>
---
 arch/mips/txx9/generic/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c
index b098a3c76ae9..1e67fecd466e 100644
--- a/arch/mips/txx9/generic/setup.c
+++ b/arch/mips/txx9/generic/setup.c
@@ -762,7 +762,7 @@ void __init txx9_aclc_init(unsigned long baseaddr, int irq,
 {
 }
 
-static struct bus_type txx9_sramc_subsys = {
+static const struct bus_type txx9_sramc_subsys = {
 	.name = "txx9_sram",
 	.dev_name = "txx9_sram",
 };

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] mips: struct bus_type cleanup
  2024-02-04 15:06 [PATCH 0/2] mips: struct bus_type cleanup Ricardo B. Marliere
  2024-02-04 15:06 ` [PATCH 1/2] mips: sgi-ip22: make gio_bus_type const Ricardo B. Marliere
  2024-02-04 15:06 ` [PATCH 2/2] mips: txx9: make txx9_sramc_subsys const Ricardo B. Marliere
@ 2024-02-05 12:51 ` Greg Kroah-Hartman
  2024-02-20 13:38 ` Thomas Bogendoerfer
  3 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2024-02-05 12:51 UTC (permalink / raw)
  To: Ricardo B. Marliere; +Cc: Thomas Bogendoerfer, linux-mips, linux-kernel

On Sun, Feb 04, 2024 at 12:06:56PM -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>
> 
> ---
> Ricardo B. Marliere (2):
>       mips: sgi-ip22: make gio_bus_type const
>       mips: txx9: make txx9_sramc_subsys const

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] mips: struct bus_type cleanup
  2024-02-04 15:06 [PATCH 0/2] mips: struct bus_type cleanup Ricardo B. Marliere
                   ` (2 preceding siblings ...)
  2024-02-05 12:51 ` [PATCH 0/2] mips: struct bus_type cleanup Greg Kroah-Hartman
@ 2024-02-20 13:38 ` Thomas Bogendoerfer
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Bogendoerfer @ 2024-02-20 13:38 UTC (permalink / raw)
  To: Ricardo B. Marliere; +Cc: linux-mips, linux-kernel, Greg Kroah-Hartman

On Sun, Feb 04, 2024 at 12:06:56PM -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>
> 
> ---
> Ricardo B. Marliere (2):
>       mips: sgi-ip22: make gio_bus_type const
>       mips: txx9: make txx9_sramc_subsys const
> 
>  arch/mips/sgi-ip22/ip22-gio.c  | 4 ++--
>  arch/mips/txx9/generic/setup.c | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> ---
> base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d
> change-id: 20240204-bus_cleanup-mips-be3d52c96e32

series applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-02-20 13:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-04 15:06 [PATCH 0/2] mips: struct bus_type cleanup Ricardo B. Marliere
2024-02-04 15:06 ` [PATCH 1/2] mips: sgi-ip22: make gio_bus_type const Ricardo B. Marliere
2024-02-04 15:06 ` [PATCH 2/2] mips: txx9: make txx9_sramc_subsys const Ricardo B. Marliere
2024-02-05 12:51 ` [PATCH 0/2] mips: struct bus_type cleanup Greg Kroah-Hartman
2024-02-20 13:38 ` Thomas Bogendoerfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).