public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] s390: struct bus_type cleanup
@ 2024-02-03 14:57 Ricardo B. Marliere
  2024-02-03 14:57 ` [PATCH 1/6] s390: ccwgroup: make ccwgroup_bus_type const Ricardo B. Marliere
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Ricardo B. Marliere @ 2024-02-03 14:57 UTC (permalink / raw)
  To: Vineeth Vijayan, Peter Oberparleiter, Heiko Carstens,
	Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
	Sven Schnelle, Harald Freudenberger, Tony Krowiak, Halil Pasic,
	Jason Herne
  Cc: Greg Kroah-Hartman, linux-s390, linux-kernel, Ricardo B. Marliere

This series is part of an effort to cleanup the users of the driver
core, as can be seen in many recent patches authored by Greg across the
tree (e.g. [1]). Specifically, this series is part of the task of
splitting one of his TODOs [2].

---
[1]: https://lore.kernel.org/lkml/?q=f%3Agregkh%40linuxfoundation.org+s%3A%22make%22+and+s%3A%22const%22
[2]: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/commit/?h=bus_cleanup&id=26105f537f0c60eacfeb430abd2e05d7ddcdd8aa

Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>

---
Ricardo B. Marliere (6):
      s390: ccwgroup: make ccwgroup_bus_type const
      s390: cio: make css_bus_type const
      s390: cio: make ccw_bus_type const
      s390: cio: make scm_bus_type const
      s390: AP: make ap_bus_type const
      s390: vfio-ap: make matrix_bus const

 drivers/s390/cio/ccwgroup.c       | 4 ++--
 drivers/s390/cio/css.c            | 4 ++--
 drivers/s390/cio/device.c         | 4 ++--
 drivers/s390/cio/scm.c            | 2 +-
 drivers/s390/crypto/ap_bus.c      | 4 ++--
 drivers/s390/crypto/vfio_ap_drv.c | 2 +-
 6 files changed, 10 insertions(+), 10 deletions(-)
---
base-commit: 8eb3db95a8c8ecd6f8bb082a99ded3bbc79b023f
change-id: 20240203-bus_cleanup-s390-82062bb32b2f

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


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

* [PATCH 1/6] s390: ccwgroup: make ccwgroup_bus_type const
  2024-02-03 14:57 [PATCH 0/6] s390: struct bus_type cleanup Ricardo B. Marliere
@ 2024-02-03 14:57 ` Ricardo B. Marliere
  2024-02-03 14:57 ` [PATCH 2/6] s390: cio: make css_bus_type const Ricardo B. Marliere
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Ricardo B. Marliere @ 2024-02-03 14:57 UTC (permalink / raw)
  To: Vineeth Vijayan, Peter Oberparleiter, Heiko Carstens,
	Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
	Sven Schnelle, Harald Freudenberger, Tony Krowiak, Halil Pasic,
	Jason Herne
  Cc: Greg Kroah-Hartman, linux-s390, linux-kernel, Ricardo B. Marliere

Now that the driver core can properly handle constant struct bus_type,
move the ccwgroup_bus_type 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>
---
 drivers/s390/cio/ccwgroup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c
index aa3292e57e38..6eb8bcd948dc 100644
--- a/drivers/s390/cio/ccwgroup.c
+++ b/drivers/s390/cio/ccwgroup.c
@@ -31,7 +31,7 @@
  * to devices that use multiple subchannels.
  */
 
-static struct bus_type ccwgroup_bus_type;
+static const struct bus_type ccwgroup_bus_type;
 
 static void __ccwgroup_remove_symlinks(struct ccwgroup_device *gdev)
 {
@@ -465,7 +465,7 @@ static void ccwgroup_shutdown(struct device *dev)
 		gdrv->shutdown(gdev);
 }
 
-static struct bus_type ccwgroup_bus_type = {
+static const struct bus_type ccwgroup_bus_type = {
 	.name   = "ccwgroup",
 	.dev_groups = ccwgroup_dev_groups,
 	.remove = ccwgroup_remove,

-- 
2.43.0


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

* [PATCH 2/6] s390: cio: make css_bus_type const
  2024-02-03 14:57 [PATCH 0/6] s390: struct bus_type cleanup Ricardo B. Marliere
  2024-02-03 14:57 ` [PATCH 1/6] s390: ccwgroup: make ccwgroup_bus_type const Ricardo B. Marliere
@ 2024-02-03 14:57 ` Ricardo B. Marliere
  2024-02-03 14:58 ` [PATCH 3/6] s390: cio: make ccw_bus_type const Ricardo B. Marliere
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Ricardo B. Marliere @ 2024-02-03 14:57 UTC (permalink / raw)
  To: Vineeth Vijayan, Peter Oberparleiter, Heiko Carstens,
	Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
	Sven Schnelle, Harald Freudenberger, Tony Krowiak, Halil Pasic,
	Jason Herne
  Cc: Greg Kroah-Hartman, linux-s390, linux-kernel, Ricardo B. Marliere

Now that the driver core can properly handle constant struct bus_type,
move the css_bus_type 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>
---
 drivers/s390/cio/css.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c
index 28a88ed2c3aa..094431a62ad5 100644
--- a/drivers/s390/cio/css.c
+++ b/drivers/s390/cio/css.c
@@ -39,7 +39,7 @@ int max_ssid;
 
 #define MAX_CSS_IDX 0
 struct channel_subsystem *channel_subsystems[MAX_CSS_IDX + 1];
-static struct bus_type css_bus_type;
+static const struct bus_type css_bus_type;
 
 int
 for_each_subchannel(int(*fn)(struct subchannel_id, void *), void *data)
@@ -1409,7 +1409,7 @@ static int css_uevent(const struct device *dev, struct kobj_uevent_env *env)
 	return ret;
 }
 
-static struct bus_type css_bus_type = {
+static const struct bus_type css_bus_type = {
 	.name     = "css",
 	.match    = css_bus_match,
 	.probe    = css_probe,

-- 
2.43.0


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

* [PATCH 3/6] s390: cio: make ccw_bus_type const
  2024-02-03 14:57 [PATCH 0/6] s390: struct bus_type cleanup Ricardo B. Marliere
  2024-02-03 14:57 ` [PATCH 1/6] s390: ccwgroup: make ccwgroup_bus_type const Ricardo B. Marliere
  2024-02-03 14:57 ` [PATCH 2/6] s390: cio: make css_bus_type const Ricardo B. Marliere
@ 2024-02-03 14:58 ` Ricardo B. Marliere
  2024-02-03 14:58 ` [PATCH 4/6] s390: cio: make scm_bus_type const Ricardo B. Marliere
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Ricardo B. Marliere @ 2024-02-03 14:58 UTC (permalink / raw)
  To: Vineeth Vijayan, Peter Oberparleiter, Heiko Carstens,
	Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
	Sven Schnelle, Harald Freudenberger, Tony Krowiak, Halil Pasic,
	Jason Herne
  Cc: Greg Kroah-Hartman, linux-s390, linux-kernel, Ricardo B. Marliere

Now that the driver core can properly handle constant struct bus_type,
move the ccw_bus_type 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>
---
 drivers/s390/cio/device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index 0cfb179e1bcb..f95d12345d98 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -49,7 +49,7 @@ static const unsigned long recovery_delay[] = { 3, 30, 300 };
 
 static atomic_t ccw_device_init_count = ATOMIC_INIT(0);
 static DECLARE_WAIT_QUEUE_HEAD(ccw_device_init_wq);
-static struct bus_type ccw_bus_type;
+static const struct bus_type ccw_bus_type;
 
 /******************* bus type handling ***********************/
 
@@ -1776,7 +1776,7 @@ static void ccw_device_shutdown(struct device *dev)
 	__disable_cmf(cdev);
 }
 
-static struct bus_type ccw_bus_type = {
+static const struct bus_type ccw_bus_type = {
 	.name   = "ccw",
 	.match  = ccw_bus_match,
 	.uevent = ccw_uevent,

-- 
2.43.0


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

* [PATCH 4/6] s390: cio: make scm_bus_type const
  2024-02-03 14:57 [PATCH 0/6] s390: struct bus_type cleanup Ricardo B. Marliere
                   ` (2 preceding siblings ...)
  2024-02-03 14:58 ` [PATCH 3/6] s390: cio: make ccw_bus_type const Ricardo B. Marliere
@ 2024-02-03 14:58 ` Ricardo B. Marliere
  2024-02-03 14:58 ` [PATCH 5/6] s390: AP: make ap_bus_type const Ricardo B. Marliere
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Ricardo B. Marliere @ 2024-02-03 14:58 UTC (permalink / raw)
  To: Vineeth Vijayan, Peter Oberparleiter, Heiko Carstens,
	Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
	Sven Schnelle, Harald Freudenberger, Tony Krowiak, Halil Pasic,
	Jason Herne
  Cc: Greg Kroah-Hartman, linux-s390, linux-kernel, Ricardo B. Marliere

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

diff --git a/drivers/s390/cio/scm.c b/drivers/s390/cio/scm.c
index 6b21ba68c1fe..375cbfa31b53 100644
--- a/drivers/s390/cio/scm.c
+++ b/drivers/s390/cio/scm.c
@@ -42,7 +42,7 @@ static int scmdev_uevent(const struct device *dev, struct kobj_uevent_env *env)
 	return add_uevent_var(env, "MODALIAS=scm:scmdev");
 }
 
-static struct bus_type scm_bus_type = {
+static const struct bus_type scm_bus_type = {
 	.name  = "scm",
 	.probe = scmdev_probe,
 	.remove = scmdev_remove,

-- 
2.43.0


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

* [PATCH 5/6] s390: AP: make ap_bus_type const
  2024-02-03 14:57 [PATCH 0/6] s390: struct bus_type cleanup Ricardo B. Marliere
                   ` (3 preceding siblings ...)
  2024-02-03 14:58 ` [PATCH 4/6] s390: cio: make scm_bus_type const Ricardo B. Marliere
@ 2024-02-03 14:58 ` Ricardo B. Marliere
  2024-02-05 10:36   ` Harald Freudenberger
  2024-02-03 14:58 ` [PATCH 6/6] s390: vfio-ap: make matrix_bus const Ricardo B. Marliere
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 13+ messages in thread
From: Ricardo B. Marliere @ 2024-02-03 14:58 UTC (permalink / raw)
  To: Vineeth Vijayan, Peter Oberparleiter, Heiko Carstens,
	Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
	Sven Schnelle, Harald Freudenberger, Tony Krowiak, Halil Pasic,
	Jason Herne
  Cc: Greg Kroah-Hartman, linux-s390, linux-kernel, Ricardo B. Marliere

Now that the driver core can properly handle constant struct bus_type,
move the ap_bus_type 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>
---
 drivers/s390/crypto/ap_bus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c
index f46dd6abacd7..2ecf4d36e78b 100644
--- a/drivers/s390/crypto/ap_bus.c
+++ b/drivers/s390/crypto/ap_bus.c
@@ -135,7 +135,7 @@ static int ap_max_domain_id = 15;
 /* Maximum adapter id, if not given via qci */
 static int ap_max_adapter_id = 63;
 
-static struct bus_type ap_bus_type;
+static const struct bus_type ap_bus_type;
 
 /* Adapter interrupt definitions */
 static void ap_interrupt_handler(struct airq_struct *airq,
@@ -1603,7 +1603,7 @@ static struct attribute *ap_bus_attrs[] = {
 };
 ATTRIBUTE_GROUPS(ap_bus);
 
-static struct bus_type ap_bus_type = {
+static const struct bus_type ap_bus_type = {
 	.name = "ap",
 	.bus_groups = ap_bus_groups,
 	.match = &ap_bus_match,

-- 
2.43.0


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

* [PATCH 6/6] s390: vfio-ap: make matrix_bus const
  2024-02-03 14:57 [PATCH 0/6] s390: struct bus_type cleanup Ricardo B. Marliere
                   ` (4 preceding siblings ...)
  2024-02-03 14:58 ` [PATCH 5/6] s390: AP: make ap_bus_type const Ricardo B. Marliere
@ 2024-02-03 14:58 ` Ricardo B. Marliere
  2024-02-05 14:00   ` Jason J. Herne
                     ` (2 more replies)
  2024-02-03 15:20 ` [PATCH 0/6] s390: struct bus_type cleanup Greg Kroah-Hartman
  2024-02-06  8:31 ` Heiko Carstens
  7 siblings, 3 replies; 13+ messages in thread
From: Ricardo B. Marliere @ 2024-02-03 14:58 UTC (permalink / raw)
  To: Vineeth Vijayan, Peter Oberparleiter, Heiko Carstens,
	Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
	Sven Schnelle, Harald Freudenberger, Tony Krowiak, Halil Pasic,
	Jason Herne
  Cc: Greg Kroah-Hartman, linux-s390, linux-kernel, Ricardo B. Marliere

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

diff --git a/drivers/s390/crypto/vfio_ap_drv.c b/drivers/s390/crypto/vfio_ap_drv.c
index a5ab03e42ff1..4aeb3e1213c7 100644
--- a/drivers/s390/crypto/vfio_ap_drv.c
+++ b/drivers/s390/crypto/vfio_ap_drv.c
@@ -60,7 +60,7 @@ static void vfio_ap_matrix_dev_release(struct device *dev)
 	kfree(matrix_dev);
 }
 
-static struct bus_type matrix_bus = {
+static const struct bus_type matrix_bus = {
 	.name = "matrix",
 };
 

-- 
2.43.0


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

* Re: [PATCH 0/6] s390: struct bus_type cleanup
  2024-02-03 14:57 [PATCH 0/6] s390: struct bus_type cleanup Ricardo B. Marliere
                   ` (5 preceding siblings ...)
  2024-02-03 14:58 ` [PATCH 6/6] s390: vfio-ap: make matrix_bus const Ricardo B. Marliere
@ 2024-02-03 15:20 ` Greg Kroah-Hartman
  2024-02-06  8:31 ` Heiko Carstens
  7 siblings, 0 replies; 13+ messages in thread
From: Greg Kroah-Hartman @ 2024-02-03 15:20 UTC (permalink / raw)
  To: Ricardo B. Marliere
  Cc: Vineeth Vijayan, Peter Oberparleiter, Heiko Carstens,
	Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
	Sven Schnelle, Harald Freudenberger, Tony Krowiak, Halil Pasic,
	Jason Herne, linux-s390, linux-kernel

On Sat, Feb 03, 2024 at 11:57:57AM -0300, Ricardo B. Marliere wrote:
> This series is part of an effort to cleanup the users of the driver
> core, as can be seen in many recent patches authored by Greg across the
> tree (e.g. [1]). Specifically, this series is part of the task of
> splitting one of his TODOs [2].
> 
> ---
> [1]: https://lore.kernel.org/lkml/?q=f%3Agregkh%40linuxfoundation.org+s%3A%22make%22+and+s%3A%22const%22
> [2]: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/commit/?h=bus_cleanup&id=26105f537f0c60eacfeb430abd2e05d7ddcdd8aa
> 
> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>

Thanks for doing this!

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

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

* Re: [PATCH 5/6] s390: AP: make ap_bus_type const
  2024-02-03 14:58 ` [PATCH 5/6] s390: AP: make ap_bus_type const Ricardo B. Marliere
@ 2024-02-05 10:36   ` Harald Freudenberger
  0 siblings, 0 replies; 13+ messages in thread
From: Harald Freudenberger @ 2024-02-05 10:36 UTC (permalink / raw)
  To: Ricardo B. Marliere
  Cc: Vineeth Vijayan, Peter Oberparleiter, Heiko Carstens,
	Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
	Sven Schnelle, Tony Krowiak, Halil Pasic, Jason Herne,
	Greg Kroah-Hartman, linux-s390, linux-kernel

On 2024-02-03 15:58, Ricardo B. Marliere wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the ap_bus_type 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>
> ---
>  drivers/s390/crypto/ap_bus.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/s390/crypto/ap_bus.c 
> b/drivers/s390/crypto/ap_bus.c
> index f46dd6abacd7..2ecf4d36e78b 100644
> --- a/drivers/s390/crypto/ap_bus.c
> +++ b/drivers/s390/crypto/ap_bus.c
> @@ -135,7 +135,7 @@ static int ap_max_domain_id = 15;
>  /* Maximum adapter id, if not given via qci */
>  static int ap_max_adapter_id = 63;
> 
> -static struct bus_type ap_bus_type;
> +static const struct bus_type ap_bus_type;
> 
>  /* Adapter interrupt definitions */
>  static void ap_interrupt_handler(struct airq_struct *airq,
> @@ -1603,7 +1603,7 @@ static struct attribute *ap_bus_attrs[] = {
>  };
>  ATTRIBUTE_GROUPS(ap_bus);
> 
> -static struct bus_type ap_bus_type = {
> +static const struct bus_type ap_bus_type = {
>  	.name = "ap",
>  	.bus_groups = ap_bus_groups,
>  	.match = &ap_bus_match,

Reviewed-by: Harald Freudenberger <freude@linux.ibm.com>

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

* Re: [PATCH 6/6] s390: vfio-ap: make matrix_bus const
  2024-02-03 14:58 ` [PATCH 6/6] s390: vfio-ap: make matrix_bus const Ricardo B. Marliere
@ 2024-02-05 14:00   ` Jason J. Herne
  2024-02-05 15:23   ` Anthony Krowiak
  2024-02-05 16:02   ` Halil Pasic
  2 siblings, 0 replies; 13+ messages in thread
From: Jason J. Herne @ 2024-02-05 14:00 UTC (permalink / raw)
  To: Ricardo B. Marliere, Vineeth Vijayan, Peter Oberparleiter,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Harald Freudenberger,
	Tony Krowiak, Halil Pasic
  Cc: Greg Kroah-Hartman, linux-s390, linux-kernel

On 2/3/24 9:58 AM, Ricardo B. Marliere wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the matrix_bus 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>
> ---
>   drivers/s390/crypto/vfio_ap_drv.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/s390/crypto/vfio_ap_drv.c b/drivers/s390/crypto/vfio_ap_drv.c
> index a5ab03e42ff1..4aeb3e1213c7 100644
> --- a/drivers/s390/crypto/vfio_ap_drv.c
> +++ b/drivers/s390/crypto/vfio_ap_drv.c
> @@ -60,7 +60,7 @@ static void vfio_ap_matrix_dev_release(struct device *dev)
>   	kfree(matrix_dev);
>   }
>   
> -static struct bus_type matrix_bus = {
> +static const struct bus_type matrix_bus = {
>   	.name = "matrix",
>   };
>   
> 

Reviewed-by: Jason J. Herne <jjherne@linux.ibm.com>

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

* Re: [PATCH 6/6] s390: vfio-ap: make matrix_bus const
  2024-02-03 14:58 ` [PATCH 6/6] s390: vfio-ap: make matrix_bus const Ricardo B. Marliere
  2024-02-05 14:00   ` Jason J. Herne
@ 2024-02-05 15:23   ` Anthony Krowiak
  2024-02-05 16:02   ` Halil Pasic
  2 siblings, 0 replies; 13+ messages in thread
From: Anthony Krowiak @ 2024-02-05 15:23 UTC (permalink / raw)
  To: Ricardo B. Marliere, Vineeth Vijayan, Peter Oberparleiter,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Harald Freudenberger,
	Halil Pasic, Jason Herne
  Cc: Greg Kroah-Hartman, linux-s390, linux-kernel

Reviewed-by: Anthony Krowiak <akrowiak@linux.ibm.com>

On 2/3/24 9:58 AM, Ricardo B. Marliere wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the matrix_bus 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>
> ---
>   drivers/s390/crypto/vfio_ap_drv.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/s390/crypto/vfio_ap_drv.c b/drivers/s390/crypto/vfio_ap_drv.c
> index a5ab03e42ff1..4aeb3e1213c7 100644
> --- a/drivers/s390/crypto/vfio_ap_drv.c
> +++ b/drivers/s390/crypto/vfio_ap_drv.c
> @@ -60,7 +60,7 @@ static void vfio_ap_matrix_dev_release(struct device *dev)
>   	kfree(matrix_dev);
>   }
>   
> -static struct bus_type matrix_bus = {
> +static const struct bus_type matrix_bus = {
>   	.name = "matrix",
>   };
>   
>

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

* Re: [PATCH 6/6] s390: vfio-ap: make matrix_bus const
  2024-02-03 14:58 ` [PATCH 6/6] s390: vfio-ap: make matrix_bus const Ricardo B. Marliere
  2024-02-05 14:00   ` Jason J. Herne
  2024-02-05 15:23   ` Anthony Krowiak
@ 2024-02-05 16:02   ` Halil Pasic
  2 siblings, 0 replies; 13+ messages in thread
From: Halil Pasic @ 2024-02-05 16:02 UTC (permalink / raw)
  To: Ricardo B. Marliere
  Cc: Vineeth Vijayan, Peter Oberparleiter, Heiko Carstens,
	Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
	Sven Schnelle, Harald Freudenberger, Tony Krowiak, Jason Herne,
	Greg Kroah-Hartman, linux-s390, linux-kernel, Halil Pasic

On Sat, 03 Feb 2024 11:58:03 -0300
"Ricardo B. Marliere" <ricardo@marliere.net> wrote:

> Now that the driver core can properly handle constant struct bus_type,
> move the matrix_bus 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>

Acked-by: Halil Pasic <pasic@linux.ibm.com>

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

* Re: [PATCH 0/6] s390: struct bus_type cleanup
  2024-02-03 14:57 [PATCH 0/6] s390: struct bus_type cleanup Ricardo B. Marliere
                   ` (6 preceding siblings ...)
  2024-02-03 15:20 ` [PATCH 0/6] s390: struct bus_type cleanup Greg Kroah-Hartman
@ 2024-02-06  8:31 ` Heiko Carstens
  7 siblings, 0 replies; 13+ messages in thread
From: Heiko Carstens @ 2024-02-06  8:31 UTC (permalink / raw)
  To: Ricardo B. Marliere
  Cc: Vineeth Vijayan, Peter Oberparleiter, Vasily Gorbik,
	Alexander Gordeev, Christian Borntraeger, Sven Schnelle,
	Harald Freudenberger, Tony Krowiak, Halil Pasic, Jason Herne,
	Greg Kroah-Hartman, linux-s390, linux-kernel

On Sat, Feb 03, 2024 at 11:57:57AM -0300, Ricardo B. Marliere wrote:
> This series is part of an effort to cleanup the users of the driver
> core, as can be seen in many recent patches authored by Greg across the
> tree (e.g. [1]). Specifically, this series is part of the task of
> splitting one of his TODOs [2].
> 
> ---
> [1]: https://lore.kernel.org/lkml/?q=f%3Agregkh%40linuxfoundation.org+s%3A%22make%22+and+s%3A%22const%22
> [2]: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/commit/?h=bus_cleanup&id=26105f537f0c60eacfeb430abd2e05d7ddcdd8aa
> 
> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
> 
> ---
> Ricardo B. Marliere (6):
>       s390: ccwgroup: make ccwgroup_bus_type const
>       s390: cio: make css_bus_type const
>       s390: cio: make ccw_bus_type const
>       s390: cio: make scm_bus_type const
>       s390: AP: make ap_bus_type const
>       s390: vfio-ap: make matrix_bus const
> 
>  drivers/s390/cio/ccwgroup.c       | 4 ++--
>  drivers/s390/cio/css.c            | 4 ++--
>  drivers/s390/cio/device.c         | 4 ++--
>  drivers/s390/cio/scm.c            | 2 +-
>  drivers/s390/crypto/ap_bus.c      | 4 ++--
>  drivers/s390/crypto/vfio_ap_drv.c | 2 +-
>  6 files changed, 10 insertions(+), 10 deletions(-)

Applied, thanks!

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

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

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-03 14:57 [PATCH 0/6] s390: struct bus_type cleanup Ricardo B. Marliere
2024-02-03 14:57 ` [PATCH 1/6] s390: ccwgroup: make ccwgroup_bus_type const Ricardo B. Marliere
2024-02-03 14:57 ` [PATCH 2/6] s390: cio: make css_bus_type const Ricardo B. Marliere
2024-02-03 14:58 ` [PATCH 3/6] s390: cio: make ccw_bus_type const Ricardo B. Marliere
2024-02-03 14:58 ` [PATCH 4/6] s390: cio: make scm_bus_type const Ricardo B. Marliere
2024-02-03 14:58 ` [PATCH 5/6] s390: AP: make ap_bus_type const Ricardo B. Marliere
2024-02-05 10:36   ` Harald Freudenberger
2024-02-03 14:58 ` [PATCH 6/6] s390: vfio-ap: make matrix_bus const Ricardo B. Marliere
2024-02-05 14:00   ` Jason J. Herne
2024-02-05 15:23   ` Anthony Krowiak
2024-02-05 16:02   ` Halil Pasic
2024-02-03 15:20 ` [PATCH 0/6] s390: struct bus_type cleanup 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