* [PATCH v2] ARM: s3c64xx: make s3c6410_subsys const
@ 2024-02-11 15:57 Ricardo B. Marliere
2024-02-12 7:31 ` Krzysztof Kozlowski
2024-02-12 8:00 ` Krzysztof Kozlowski
0 siblings, 2 replies; 4+ messages in thread
From: Ricardo B. Marliere @ 2024-02-11 15:57 UTC (permalink / raw)
To: Krzysztof Kozlowski, Alim Akhtar, Russell King
Cc: linux-arm-kernel, linux-samsung-soc, linux-kernel,
Greg Kroah-Hartman, Ricardo B. Marliere
Since commit d492cc2573a0 ("driver core: device.h: make struct bus_type
a const *"), the driver core can properly handle constant struct
bus_type, move the s3c6410_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>
---
Changes in v2:
- Instead of "Now", defined a specific commit in the changelog.
- Link to v1: https://lore.kernel.org/r/20240211-bus_cleanup-arm-v1-1-5c0102bda0bd@marliere.net
---
arch/arm/mach-s3c/cpu.h | 2 +-
arch/arm/mach-s3c/s3c6410.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-s3c/cpu.h b/arch/arm/mach-s3c/cpu.h
index d0adc9b40e25..a0187606b999 100644
--- a/arch/arm/mach-s3c/cpu.h
+++ b/arch/arm/mach-s3c/cpu.h
@@ -76,6 +76,6 @@ extern void s3c24xx_init_uartdevs(char *name,
struct s3c24xx_uart_resources *res,
struct s3c2410_uartcfg *cfg, int no);
-extern struct bus_type s3c6410_subsys;
+extern const struct bus_type s3c6410_subsys;
#endif
diff --git a/arch/arm/mach-s3c/s3c6410.c b/arch/arm/mach-s3c/s3c6410.c
index e79f18d0ca81..a29276a4fde5 100644
--- a/arch/arm/mach-s3c/s3c6410.c
+++ b/arch/arm/mach-s3c/s3c6410.c
@@ -57,7 +57,7 @@ void __init s3c6410_init_irq(void)
s3c64xx_init_irq(~0 & ~(1 << 7), ~0);
}
-struct bus_type s3c6410_subsys = {
+const struct bus_type s3c6410_subsys = {
.name = "s3c6410-core",
.dev_name = "s3c6410-core",
};
---
base-commit: fee3a71dc8d26629e5d87e20cff08763f522633f
change-id: 20240211-bus_cleanup-arm-da0f2550ca48
Best regards,
--
Ricardo B. Marliere <ricardo@marliere.net>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ARM: s3c64xx: make s3c6410_subsys const
2024-02-11 15:57 [PATCH v2] ARM: s3c64xx: make s3c6410_subsys const Ricardo B. Marliere
@ 2024-02-12 7:31 ` Krzysztof Kozlowski
2024-02-12 11:35 ` Ricardo B. Marliere
2024-02-12 8:00 ` Krzysztof Kozlowski
1 sibling, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2024-02-12 7:31 UTC (permalink / raw)
To: Ricardo B. Marliere, Alim Akhtar, Russell King
Cc: linux-arm-kernel, linux-samsung-soc, linux-kernel, Greg Kroah-Hartman
On 11/02/2024 16:57, Ricardo B. Marliere wrote:
> Since commit d492cc2573a0 ("driver core: device.h: make struct bus_type
> a const *"), the driver core can properly handle constant struct
> bus_type, move the s3c6410_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>
> ---
I just noticed you sent quite the same change for the same subarch.
Please perform changes all at once. Squashed.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ARM: s3c64xx: make s3c6410_subsys const
2024-02-11 15:57 [PATCH v2] ARM: s3c64xx: make s3c6410_subsys const Ricardo B. Marliere
2024-02-12 7:31 ` Krzysztof Kozlowski
@ 2024-02-12 8:00 ` Krzysztof Kozlowski
1 sibling, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2024-02-12 8:00 UTC (permalink / raw)
To: Alim Akhtar, Russell King, Ricardo B. Marliere
Cc: linux-arm-kernel, linux-samsung-soc, linux-kernel, Greg Kroah-Hartman
On Sun, 11 Feb 2024 12:57:09 -0300, Ricardo B. Marliere wrote:
> Since commit d492cc2573a0 ("driver core: device.h: make struct bus_type
> a const *"), the driver core can properly handle constant struct
> bus_type, move the s3c6410_subsys variable to be a constant structure as
> well, placing it into read-only memory which can not be modified at
> runtime.
>
>
> [...]
Applied, thanks!
[1/1] ARM: s3c64xx: make s3c6410_subsys const
https://git.kernel.org/krzk/linux/c/a3891621d4a0783ae178d6f2845517e3dd571dd4
Best regards,
--
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ARM: s3c64xx: make s3c6410_subsys const
2024-02-12 7:31 ` Krzysztof Kozlowski
@ 2024-02-12 11:35 ` Ricardo B. Marliere
0 siblings, 0 replies; 4+ messages in thread
From: Ricardo B. Marliere @ 2024-02-12 11:35 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Alim Akhtar, Russell King, linux-arm-kernel, linux-samsung-soc,
linux-kernel, Greg Kroah-Hartman
Hi Krzysztof,
On 12 Feb 08:31, Krzysztof Kozlowski wrote:
> On 11/02/2024 16:57, Ricardo B. Marliere wrote:
> > Since commit d492cc2573a0 ("driver core: device.h: make struct bus_type
> > a const *"), the driver core can properly handle constant struct
> > bus_type, move the s3c6410_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>
> > ---
>
> I just noticed you sent quite the same change for the same subarch.
> Please perform changes all at once. Squashed.
Yes, sorry about that. The reason for this is that I initially started
splitting up this commit into proper submissions:
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/commit/?h=bus_cleanup&id=26105f537f0c60eacfeb430abd2e05d7ddcdd8aa
And only after that I started grepping the tree for the other users.
>
> Best regards,
> Krzysztof
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-02-12 11:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-11 15:57 [PATCH v2] ARM: s3c64xx: make s3c6410_subsys const Ricardo B. Marliere
2024-02-12 7:31 ` Krzysztof Kozlowski
2024-02-12 11:35 ` Ricardo B. Marliere
2024-02-12 8:00 ` Krzysztof Kozlowski
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®