diff mbox series

ssb: make ssb_bustype const

Message ID 20240204-bus_cleanup-ssb-v1-1-511026cd5f3c@marliere.net
State New
Headers show
Series ssb: make ssb_bustype const | expand

Commit Message

Ricardo B. Marliere Feb. 4, 2024, 8:44 p.m. UTC
Now that the driver core can properly handle constant struct bus_type,
move the ssb_bustype 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/ssb/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


---
base-commit: 41b9fb381a486360b2daaec0c7480f8e3ff72bc7
change-id: 20240204-bus_cleanup-ssb-64aef4eda20e

Best regards,

Comments

Greg Kroah-Hartman Feb. 5, 2024, 12:46 p.m. UTC | #1
On Sun, Feb 04, 2024 at 05:44:21PM -0300, Ricardo B. Marliere wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the ssb_bustype 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>

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kalle Valo Feb. 6, 2024, 6:31 a.m. UTC | #2
Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:

> On Sun, Feb 04, 2024 at 05:44:21PM -0300, Ricardo B. Marliere wrote:
>> Now that the driver core can properly handle constant struct bus_type,
>> move the ssb_bustype 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>
>
> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Greg, I saw your Reviewed-by email 7 times. Not sure if the problem is
on my end or your end but wanted to make sure you are aware of it.
Greg Kroah-Hartman Feb. 6, 2024, 9:45 a.m. UTC | #3
On Tue, Feb 06, 2024 at 08:31:44AM +0200, Kalle Valo wrote:
> Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:
> 
> > On Sun, Feb 04, 2024 at 05:44:21PM -0300, Ricardo B. Marliere wrote:
> >> Now that the driver core can properly handle constant struct bus_type,
> >> move the ssb_bustype 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>
> >
> > Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 
> Greg, I saw your Reviewed-by email 7 times. Not sure if the problem is
> on my end or your end but wanted to make sure you are aware of it.

Yes, sorry, happened due to writing emails on a plane without a fully
working internet connection :(

My fault.

greg k-h
Kalle Valo Feb. 6, 2024, 6:07 p.m. UTC | #4
"Ricardo B. Marliere" <ricardo@marliere.net> wrote:

> Now that the driver core can properly handle constant struct bus_type,
> move the ssb_bustype 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: Michael Büsch <m@bues.ch>
> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Patch applied to wireless-next.git, thanks.

78092e68557b ssb: make ssb_bustype const
diff mbox series

Patch

diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
index b9934b9c2d70..9f30e0edadfe 100644
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -384,7 +384,7 @@  static struct attribute *ssb_device_attrs[] = {
 };
 ATTRIBUTE_GROUPS(ssb_device);
 
-static struct bus_type ssb_bustype = {
+static const struct bus_type ssb_bustype = {
 	.name		= "ssb",
 	.match		= ssb_bus_match,
 	.probe		= ssb_device_probe,