* [PATCH] arch: powerpc: ps3: Make ps3_system_bus_type const
@ 2025-09-18 11:48 Adrian Barnaś
2025-09-18 13:05 ` Greg Kroah-Hartman
2025-09-19 8:07 ` Geert Uytterhoeven
0 siblings, 2 replies; 3+ messages in thread
From: Adrian Barnaś @ 2025-09-18 11:48 UTC (permalink / raw)
To: Geoff Levand, 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 ps3_system_bus_type 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/ps3/system-bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c
index afbaabf182d0..c5b880c411ef 100644
--- a/arch/powerpc/platforms/ps3/system-bus.c
+++ b/arch/powerpc/platforms/ps3/system-bus.c
@@ -465,7 +465,7 @@ static struct attribute *ps3_system_bus_dev_attrs[] = {
};
ATTRIBUTE_GROUPS(ps3_system_bus_dev);
-static struct bus_type ps3_system_bus_type = {
+static const struct bus_type ps3_system_bus_type = {
.name = "ps3_system_bus",
.match = ps3_system_bus_match,
.uevent = ps3_system_bus_uevent,
--
2.51.0.470.ga7dc726c21-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] arch: powerpc: ps3: Make ps3_system_bus_type const
2025-09-18 11:48 [PATCH] arch: powerpc: ps3: Make ps3_system_bus_type const Adrian Barnaś
@ 2025-09-18 13:05 ` Greg Kroah-Hartman
2025-09-19 8:07 ` Geert Uytterhoeven
1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2025-09-18 13:05 UTC (permalink / raw)
To: Adrian Barnaś
Cc: Geoff Levand, Madhavan Srinivasan, Michael Ellerman,
Nicholas Piggin, Christophe Leroy, linuxppc-dev, linux-kernel
On Thu, Sep 18, 2025 at 11:48:40AM +0000, Adrian Barnaś wrote:
> Because driver core can properly handle constant struct bus_type,
> move the ps3_system_bus_type 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/ps3/system-bus.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arch: powerpc: ps3: Make ps3_system_bus_type const
2025-09-18 11:48 [PATCH] arch: powerpc: ps3: Make ps3_system_bus_type const Adrian Barnaś
2025-09-18 13:05 ` Greg Kroah-Hartman
@ 2025-09-19 8:07 ` Geert Uytterhoeven
1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2025-09-19 8:07 UTC (permalink / raw)
To: Adrian Barnaś
Cc: Geoff Levand, Madhavan Srinivasan, Michael Ellerman,
Nicholas Piggin, Christophe Leroy, linuxppc-dev, linux-kernel,
Greg Kroah-Hartman
On Thu, 18 Sept 2025 at 13:49, Adrian Barnaś <abarnas@google.com> wrote:
> Because driver core can properly handle constant struct bus_type,
> move the ps3_system_bus_type 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>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
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] 3+ messages in thread
end of thread, other threads:[~2025-09-19 8:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-18 11:48 [PATCH] arch: powerpc: ps3: Make ps3_system_bus_type const Adrian Barnaś
2025-09-18 13:05 ` Greg Kroah-Hartman
2025-09-19 8:07 ` Geert Uytterhoeven
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).