public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] s390: time: make stp_subsys const
@ 2024-02-04 14:25 Ricardo B. Marliere
  2024-02-04 14:38 ` Greg Kroah-Hartman
  2024-02-06  8:31 ` Heiko Carstens
  0 siblings, 2 replies; 3+ messages in thread
From: Ricardo B. Marliere @ 2024-02-04 14:25 UTC (permalink / raw)
  To: Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle
  Cc: linux-s390, linux-kernel, Greg Kroah-Hartman, Ricardo B. Marliere

Now that the driver core can properly handle constant struct bus_type,
move the stp_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/s390/kernel/time.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index 14abad953c02..39a42369389c 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -716,7 +716,7 @@ static void stp_work_fn(struct work_struct *work)
 /*
  * STP subsys sysfs interface functions
  */
-static struct bus_type stp_subsys = {
+static const struct bus_type stp_subsys = {
 	.name		= "stp",
 	.dev_name	= "stp",
 };

---
base-commit: 8eb3db95a8c8ecd6f8bb082a99ded3bbc79b023f
change-id: 20240204-bus_cleanup-s390_time-cf8851bbc1dc

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


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

* Re: [PATCH] s390: time: make stp_subsys const
  2024-02-04 14:25 [PATCH] s390: time: make stp_subsys const Ricardo B. Marliere
@ 2024-02-04 14:38 ` Greg Kroah-Hartman
  2024-02-06  8:31 ` Heiko Carstens
  1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2024-02-04 14:38 UTC (permalink / raw)
  To: Ricardo B. Marliere
  Cc: Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, linux-s390, linux-kernel

On Sun, Feb 04, 2024 at 11:25:45AM -0300, Ricardo B. Marliere wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the stp_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/s390/kernel/time.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] s390: time: make stp_subsys const
  2024-02-04 14:25 [PATCH] s390: time: make stp_subsys const Ricardo B. Marliere
  2024-02-04 14:38 ` Greg Kroah-Hartman
@ 2024-02-06  8:31 ` Heiko Carstens
  1 sibling, 0 replies; 3+ messages in thread
From: Heiko Carstens @ 2024-02-06  8:31 UTC (permalink / raw)
  To: Ricardo B. Marliere
  Cc: Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
	Sven Schnelle, linux-s390, linux-kernel, Greg Kroah-Hartman

On Sun, Feb 04, 2024 at 11:25:45AM -0300, Ricardo B. Marliere wrote:
1;115;0c> Now that the driver core can properly handle constant struct bus_type,
> move the stp_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/s390/kernel/time.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks!

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

end of thread, other threads:[~2024-02-06  8:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-04 14:25 [PATCH] s390: time: make stp_subsys const Ricardo B. Marliere
2024-02-04 14:38 ` Greg Kroah-Hartman
2024-02-06  8:31 ` Heiko Carstens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox