public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dma: dma-sysfs: make dma_subsys const
@ 2024-02-04 15:15 Ricardo B. Marliere
  2024-02-04 20:45 ` Geert Uytterhoeven
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ricardo B. Marliere @ 2024-02-04 15:15 UTC (permalink / raw)
  To: Yoshinori Sato, Rich Felker, John Paul Adrian Glaubitz
  Cc: linux-sh, linux-kernel, Greg Kroah-Hartman, Ricardo B. Marliere

Now that the driver core can properly handle constant struct bus_type,
move the dma_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/sh/drivers/dma/dma-sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sh/drivers/dma/dma-sysfs.c b/arch/sh/drivers/dma/dma-sysfs.c
index 431bc18f0a41..9f666280d80c 100644
--- a/arch/sh/drivers/dma/dma-sysfs.c
+++ b/arch/sh/drivers/dma/dma-sysfs.c
@@ -15,7 +15,7 @@
 #include <linux/string.h>
 #include <asm/dma.h>
 
-static struct bus_type dma_subsys = {
+static const struct bus_type dma_subsys = {
 	.name = "dma",
 	.dev_name = "dma",
 };

---
base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d
change-id: 20240204-bus_cleanup-sh-6d3c136da6bb

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


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

* Re: [PATCH] dma: dma-sysfs: make dma_subsys const
  2024-02-04 15:15 [PATCH] dma: dma-sysfs: make dma_subsys const Ricardo B. Marliere
@ 2024-02-04 20:45 ` Geert Uytterhoeven
  2024-02-05  5:17 ` John Paul Adrian Glaubitz
  2024-02-05 12:51 ` Greg Kroah-Hartman
  2 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2024-02-04 20:45 UTC (permalink / raw)
  To: Ricardo B. Marliere
  Cc: Yoshinori Sato, Rich Felker, John Paul Adrian Glaubitz, linux-sh,
	linux-kernel, Greg Kroah-Hartman

On Sun, Feb 4, 2024 at 4:14 PM Ricardo B. Marliere <ricardo@marliere.net> wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the dma_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>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH] dma: dma-sysfs: make dma_subsys const
  2024-02-04 15:15 [PATCH] dma: dma-sysfs: make dma_subsys const Ricardo B. Marliere
  2024-02-04 20:45 ` Geert Uytterhoeven
@ 2024-02-05  5:17 ` John Paul Adrian Glaubitz
  2024-02-05 12:09   ` Ricardo B. Marliere
  2024-02-05 12:51 ` Greg Kroah-Hartman
  2 siblings, 1 reply; 6+ messages in thread
From: John Paul Adrian Glaubitz @ 2024-02-05  5:17 UTC (permalink / raw)
  To: Ricardo B. Marliere, Yoshinori Sato, Rich Felker
  Cc: linux-sh, linux-kernel, Greg Kroah-Hartman

Hi Ricardo,

On Sun, 2024-02-04 at 12:15 -0300, Ricardo B. Marliere wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the dma_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/sh/drivers/dma/dma-sysfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/sh/drivers/dma/dma-sysfs.c b/arch/sh/drivers/dma/dma-sysfs.c
> index 431bc18f0a41..9f666280d80c 100644
> --- a/arch/sh/drivers/dma/dma-sysfs.c
> +++ b/arch/sh/drivers/dma/dma-sysfs.c
> @@ -15,7 +15,7 @@
>  #include <linux/string.h>
>  #include <asm/dma.h>
>  
> -static struct bus_type dma_subsys = {
> +static const struct bus_type dma_subsys = {
>  	.name = "dma",
>  	.dev_name = "dma",
>  };
> 
> ---
> base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d
> change-id: 20240204-bus_cleanup-sh-6d3c136da6bb
> 
> Best regards,

Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>

Thanks for your patch. I will merge it into my linux-sh this weekend
after returning from FOSDEM, either this evening or tomorrow.

Thanks,
Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

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

* Re: [PATCH] dma: dma-sysfs: make dma_subsys const
  2024-02-05  5:17 ` John Paul Adrian Glaubitz
@ 2024-02-05 12:09   ` Ricardo B. Marliere
  2024-02-05 16:34     ` John Paul Adrian Glaubitz
  0 siblings, 1 reply; 6+ messages in thread
From: Ricardo B. Marliere @ 2024-02-05 12:09 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz
  Cc: Yoshinori Sato, Rich Felker, linux-sh, linux-kernel,
	Greg Kroah-Hartman

On  5 Feb 06:17, John Paul Adrian Glaubitz wrote:
> Hi Ricardo,
> 
> On Sun, 2024-02-04 at 12:15 -0300, Ricardo B. Marliere wrote:
> > Now that the driver core can properly handle constant struct bus_type,
> > move the dma_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/sh/drivers/dma/dma-sysfs.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/sh/drivers/dma/dma-sysfs.c b/arch/sh/drivers/dma/dma-sysfs.c
> > index 431bc18f0a41..9f666280d80c 100644
> > --- a/arch/sh/drivers/dma/dma-sysfs.c
> > +++ b/arch/sh/drivers/dma/dma-sysfs.c
> > @@ -15,7 +15,7 @@
> >  #include <linux/string.h>
> >  #include <asm/dma.h>
> >  
> > -static struct bus_type dma_subsys = {
> > +static const struct bus_type dma_subsys = {
> >  	.name = "dma",
> >  	.dev_name = "dma",
> >  };
> > 
> > ---
> > base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d
> > change-id: 20240204-bus_cleanup-sh-6d3c136da6bb
> > 
> > Best regards,
> 
> Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
> 
> Thanks for your patch. I will merge it into my linux-sh this weekend
> after returning from FOSDEM, either this evening or tomorrow.

Hi John,

thanks for reviewing. I was wondering if your tree should be listed
under SUPERH in the MAINTAINERS file? I didn't find it there and had to
do some searching.

All the best,
-	Ricardo.


> 
> Thanks,
> Adrian
> 
> -- 
>  .''`.  John Paul Adrian Glaubitz
> : :' :  Debian Developer
> `. `'   Physicist
>   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

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

* Re: [PATCH] dma: dma-sysfs: make dma_subsys const
  2024-02-04 15:15 [PATCH] dma: dma-sysfs: make dma_subsys const Ricardo B. Marliere
  2024-02-04 20:45 ` Geert Uytterhoeven
  2024-02-05  5:17 ` John Paul Adrian Glaubitz
@ 2024-02-05 12:51 ` Greg Kroah-Hartman
  2 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2024-02-05 12:51 UTC (permalink / raw)
  To: Ricardo B. Marliere
  Cc: Yoshinori Sato, Rich Felker, John Paul Adrian Glaubitz, linux-sh,
	linux-kernel

On Sun, Feb 04, 2024 at 12:15:09PM -0300, Ricardo B. Marliere wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the dma_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>

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

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

* Re: [PATCH] dma: dma-sysfs: make dma_subsys const
  2024-02-05 12:09   ` Ricardo B. Marliere
@ 2024-02-05 16:34     ` John Paul Adrian Glaubitz
  0 siblings, 0 replies; 6+ messages in thread
From: John Paul Adrian Glaubitz @ 2024-02-05 16:34 UTC (permalink / raw)
  To: Ricardo B. Marliere
  Cc: Yoshinori Sato, Rich Felker, linux-sh, linux-kernel,
	Greg Kroah-Hartman

Hi Ricardo,

On Mon, 2024-02-05 at 09:09 -0300, Ricardo B. Marliere wrote:
> thanks for reviewing. I was wondering if your tree should be listed
> under SUPERH in the MAINTAINERS file? I didn't find it there and had to
> do some searching.

You're absolutely right. I got my tree set up after I was added to the
MAINTAINERS file, so I eventually forgot to add the URL to my tree.

I will send a patch this week to correct that. Thanks for the heads-up!

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

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

end of thread, other threads:[~2024-02-05 19:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-04 15:15 [PATCH] dma: dma-sysfs: make dma_subsys const Ricardo B. Marliere
2024-02-04 20:45 ` Geert Uytterhoeven
2024-02-05  5:17 ` John Paul Adrian Glaubitz
2024-02-05 12:09   ` Ricardo B. Marliere
2024-02-05 16:34     ` John Paul Adrian Glaubitz
2024-02-05 12:51 ` 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