* [PATCH] powerpc: cell: make spu_subsys const
@ 2025-09-18 14:16 Adrian Barnaś
2025-09-18 16:19 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Adrian Barnaś @ 2025-09-18 14:16 UTC (permalink / raw)
To: Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
Christophe Leroy, linuxppc-dev, linux-kernel
Cc: Greg Kroah-Hartman, Adrian Barnaś
Because driver core can properly handle constant struct bus_type,
move the spu_subsys to be a constant structure as well, placing it into
read-only memory which can not be modified at runtime.
Signed-off-by: Adrian Barnaś <abarnas@google.com>
---
arch/powerpc/platforms/cell/spu_base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c
index 2c07387201d0..733b512992c0 100644
--- a/arch/powerpc/platforms/cell/spu_base.c
+++ b/arch/powerpc/platforms/cell/spu_base.c
@@ -464,7 +464,7 @@ void spu_init_channels(struct spu *spu)
}
EXPORT_SYMBOL_GPL(spu_init_channels);
-static struct bus_type spu_subsys = {
+static const struct bus_type spu_subsys = {
.name = "spu",
.dev_name = "spu",
};
--
2.51.0.470.ga7dc726c21-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc: cell: make spu_subsys const
2025-09-18 14:16 [PATCH] powerpc: cell: make spu_subsys const Adrian Barnaś
@ 2025-09-18 16:19 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2025-09-18 16:19 UTC (permalink / raw)
To: Adrian Barnaś
Cc: Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
Christophe Leroy, linuxppc-dev, linux-kernel
On Thu, Sep 18, 2025 at 02:16:33PM +0000, Adrian Barnaś wrote:
> Because driver core can properly handle constant struct bus_type,
> move the spu_subsys to be a constant structure as well, placing it into
> read-only memory which can not be modified at runtime.
>
> Signed-off-by: Adrian Barnaś <abarnas@google.com>
> ---
> arch/powerpc/platforms/cell/spu_base.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c
> index 2c07387201d0..733b512992c0 100644
> --- a/arch/powerpc/platforms/cell/spu_base.c
> +++ b/arch/powerpc/platforms/cell/spu_base.c
> @@ -464,7 +464,7 @@ void spu_init_channels(struct spu *spu)
> }
> EXPORT_SYMBOL_GPL(spu_init_channels);
>
> -static struct bus_type spu_subsys = {
> +static const struct bus_type spu_subsys = {
> .name = "spu",
> .dev_name = "spu",
> };
> --
> 2.51.0.470.ga7dc726c21-goog
>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-09-18 16:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-18 14:16 [PATCH] powerpc: cell: make spu_subsys const Adrian Barnaś
2025-09-18 16:19 ` 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;
as well as URLs for NNTP newsgroup(s).