2024-02-04 20:43:59

by Ricardo B. Marliere

[permalink] [raw]
Subject: [PATCH] ssb: make ssb_bustype const

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 <[email protected]>
Suggested-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Ricardo B. Marliere <[email protected]>
---
drivers/ssb/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

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,

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

Best regards,
--
Ricardo B. Marliere <[email protected]>



2024-02-04 21:10:40

by Michael Büsch

[permalink] [raw]
Subject: Re: [PATCH] ssb: make ssb_bustype const

On Sun, 04 Feb 2024 17:44:21 -0300
"Ricardo B. Marliere" <[email protected]> wrote:

> --- 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,

Acked-by: Michael Büsch <[email protected]>


--
Michael Büsch
https://bues.ch/


Attachments:
(No filename) (849.00 B)
OpenPGP digital signature

2024-02-05 19:12:50

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] ssb: make ssb_bustype const

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 <[email protected]>
> Suggested-by: Greg Kroah-Hartman <[email protected]>
> Signed-off-by: Ricardo B. Marliere <[email protected]>

Reviewed-by: Greg Kroah-Hartman <[email protected]>

2024-02-06 06:31:56

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] ssb: make ssb_bustype const

Greg Kroah-Hartman <[email protected]> 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 <[email protected]>
>> Suggested-by: Greg Kroah-Hartman <[email protected]>
>> Signed-off-by: Ricardo B. Marliere <[email protected]>
>
> Reviewed-by: Greg Kroah-Hartman <[email protected]>

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.

--
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

2024-02-06 09:46:04

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] ssb: make ssb_bustype const

On Tue, Feb 06, 2024 at 08:31:44AM +0200, Kalle Valo wrote:
> Greg Kroah-Hartman <[email protected]> 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 <[email protected]>
> >> Suggested-by: Greg Kroah-Hartman <[email protected]>
> >> Signed-off-by: Ricardo B. Marliere <[email protected]>
> >
> > Reviewed-by: Greg Kroah-Hartman <[email protected]>
>
> 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